kingkumak

CQ1M to CJ2M conversion interrupts problem

6 posts in this topic

I am new in PLC and I have a problem with one thing. I have to change old CQ1M PLC to CJ2M. I have a problem with instructions INT(89) in Cx-programmer. When I changed model of PLC, during compilation occurs error. It says that instruction INT(89) is not supported by CJ2M. So my questions is how this instructions look in new CJ2M PLC. Please see attached file. 

interrupts.PNG

Share this post


Link to post
Share on other sites

CJ2M uses a completely different method of Interrupt Control than CQM1.

Interrupts are configured by first defining a specific interrupt TASK.

Read and understand this concept in section 5-2 TASKS of manual W473-E1-08 CJ2 Unit Software user manual.

Once the type of TASK has been defined it is controlled in various ways. See attached page.

 

Interrupt Tasks.pdf

Share this post


Link to post
Share on other sites

Thank you for your help. So in your opiniom, what kind of interrupt should I choose for this situation? I admit that variable "activo_al_arran"  is first task execution flag (A200.15)

Share this post


Link to post
Share on other sites

I do not think that you can use interrupts in this fashion in a CJ2M. I would recommend that you look at using Subroutines and put the code that is in the interrupt routines in your subs, or just pull all of the code into your main program and trigger it all with the First Scan bit (this is probably the easiest option).  The programs are just initialization programs, so either of the above suggestions would work. 

Share this post


Link to post
Share on other sites
On 24.03.2016 at 6:04 PM, Michael Walsh said:

I do not think that you can use interrupts in this fashion in a CJ2M. I would recommend that you look at using Subroutines and put the code that is in the interrupt routines in your subs, or just pull all of the code into your main program and trigger it all with the First Scan bit (this is probably the easiest option).  The programs are just initialization programs, so either of the above suggestions would work. 

Thank you for your advise. But the problem is that I dont understand how to interpret block INT(89) in this programm. I am not the author, so I have to face a many difficultes in it. Do you have any ideas how to interpret this piece of code?

Share this post


Link to post
Share on other sites

Well, after looking at the instruction, it might be possible that you can still use interrupts in the same manner.  It is difficult to tell what the instruction is doing without knowing what is in each of the operands.  If you can tell us what value is in each of the variables in the INT instruction, we can provide more details.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now