Marker

CJ2M CPU 11 INTERRUPT TASK

3 posts in this topic

Hi to everyone,

I'm trying to use interrupt tasks on a CJ2M-CPU 11 with two connected modules, ID211 and OC211.

First of all, i have assigned in the settings table of the PLC, the IN00 to the interrupt task 0, so it is calling the INT 140 where i have placed my instructions.

Then i called in the Main, the MSKS instruction with the N value as 100 and control data as #0000, to unmask the IN00 channel assigned to Task 140.

In this case,  i'm trying to reproduce a high speed counter imported from an older program, that uses a different kind of interrupt tasks management.

But the instructions called in the task, seems to be never called by them program, then the counter never grows.

(I know that is available a specific high speed counter function, but to use this old program i'm costricted to use the interrupt tasks to count.)

Thank you for any help.

Best regards.

 

 

Share this post


Link to post
Share on other sites

Hi, I think interrupts is only available on board that supported it, so not on ID or OC modules. You must used MD212 or MD211.

Share this post


Link to post
Share on other sites

Yeah, just saw it on a data sheet that explain how works this PLC function, unfortunately i can't modify the PLC configuration.

I solved using a cyclic interrupt task at 1 ms, that checks after an IORF function the state of the interested address every 1 ms, i just hope that sensor will not be faster.

Thank you very much for your help and tips! :-2

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