eagleplc

Internal Counter Holding

6 posts in this topic

We have a machine that loads 6 parts at a time, when we detect a bad part i'd like to require the operator to manually eject eject all 6 parts before continuing the normal operation.

What's the most efficient way to write this?

Can it be done so that power cycling the PLC won't reset the logic and bypass the count?

Share this post


Link to post
Share on other sites

https://industrial.omron.ca/en/media/W473-E1-08_tcm824-110490.pdf

Depending on what PLC model you have you can use Holding Registers. These are memory retentive. So if the contents were on when power is cycled they will remain on  when power is restored.
See Section  6-11 Holding Area  of the above manual.

So you have two inputs for each of the parts: One input to tell presence and the other to determine if it is good?

Regards,
Garry

Share this post


Link to post
Share on other sites

Looks like the holding register is what i'm looking for, but how do i set it up. do i use the HR to drive the counter (or will the counter reset on power cycle)? or am i writing the count to the HR so it doesn't lose the number when power cycles?

Share this post


Link to post
Share on other sites

You still haven't told us which PLC you have, but assuming that it is reasonably current you should be able to use the ++(590) and --(592) instructions to manipulate the value in a DM or H register. Those register values will be maintained during a power cycle.

Share this post


Link to post
Share on other sites

You can also use a regular CNT instruction with the set value (SV) as a HR or DM register. The present value (PV) will be memory retentive. 

Use the bits of the HR register for bit latching. Instructions like KEEP, Set, Reset can be used to create a memory retentive bit.

Regards,
Garry

Share this post


Link to post
Share on other sites

Awesome thanks for the guidance, I really appreciate it

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