kolonelvonklink

CPM2 CMP issue

4 posts in this topic

Hi

For a machine, when a fault appears, I would like to output (12,07) a pulse with variable lenght (T30)according to the fault (word 250)

So please take a look at the prg in attachment, section DISPLAY,

-In rung 1 to 33 a value is stored in word 250 when a fault appears,

-At the end of the section: timer 30:

The timer changes value when another fault appears, but the timer keeps on re-running so the puls never ends,

-At rung 34(313) I can't get marker 210,11 set,

So the output KEEPs getting high

Please help me. What am I missing?

Or is there a better way to do this?

Thank you

 

Labeler.cxp

Share this post


Link to post
Share on other sites

Your XFER(70) instruction was being executed the entire time. This means it was holding your timer value at the Set Point and not allowing it to count down. See the attached image where I preceded it with an "@". This will make the instruction execute only once (One PLC Scan) on the rising edge. I also changed 210.11 from NC to NO and the Equals (EQ) Flag from NO to NC (Not shown in the image). This just made more sense to me when I was troubleshooting it.

LabelerFix.thumb.jpg.73f5c7daf9bee9a863e

Share this post


Link to post
Share on other sites

Thank you for the effort, Your remark are worth mentioning but I found the main reason: (took me a few extra hours)
Words 250 and 251 are in the SR memory area which is used by the PLC itself.

So lesson learned: when using memory, always check out the appropriate memory areas

Share this post


Link to post
Share on other sites

My apologies as I should have seen that. In order to simulate your program, I had to convert it to a CP1L where the memory areas are different. With the CP1L, CP1H, CS and CJ series PLCs, they have added "W" memory in which Omron promises never to be used by the system. This was a huge improvement for programming Omron PLCs for the reasons that you have encountered.

Omron's preferred method of dealing with numbers (as opposed to BOOLs) is to use "DM" memory. This memory is retentive. It has areas that are also used for the system, I think in the DM20000 range if I remember correctly . It's well documented but you'll need to know to look for it.

Good troubleshooting on your part!

Edited by IO_Rack

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