RSLOGIX 500 and the counter instruction

david90

Member
Join Date
Apr 2010
Location
ca
Posts
202
The counter instruction has an OV, a UN and a UA flag but they don't seem to do anything.

For example, the OV (over flow flag) doesn't turn on when the accumulator value is greater than the preset value. Is this a bug or I'm just not using the counter instruction the right way?

The DN flag is an exception. It turns on whenever the accum. value is equal or greater than the preset.

Thanks for the help.
 
Last edited:
OV indicates integer overflow - for Logix 500 that happens when the counter accumulator is +32767 and an up count CTU occurs. The integer accumulator overflows and the count goes to -32768.

UN indicates underflow. It happens when down counting CTD from -32768 and the integer accumulator rolls around from -32768 to +32767.

You might want to go the literature library at AB.com and download the instruction set reference manual for your particular processor. It will provide full details on all the bits.
 
I think the OV and UN bits of the counter get set when it "rolls over" from 32,767 to -32,768 (or rolls under, -32,768 to 32,767)

I've never used a counter in that way though.
 
As TConnolly stated, the OV and OL values indicated integer overflow so you will know when rollover occurs. This is farm more useful than having special instructions for accumulator values higher than preset since you can implement that behavior using a GRT counter.ACC counter.PRE instruction.
 
Thanks. I read the instruction help that comes with rslogix but I was confused about what overflow meant.
 
You also should be made aware that the counter will set the .DN bit if you manually make the .ACC greater than or equal to the .PRE - EVEN IF THE RUNG IS FALSE !! This could trigger other logic into operation at the wrong time.

Counters belong to a group of instructions that execute even though the rung is false. In this case, it serves to reset the internal memories .CU and .CD, so that the counter will count next time the rung goes true. But it also does the .PRE/.ACC comparison, and sets or resets the .DN bit accordingly.
 

Similar Topics

Tonight I'm contemplating using a technique I saw the other day while troubleshooting an installation of a legacy machine for a customer of mine...
Replies
9
Views
4,067
Here's the situation: operators print off labels for finished products, scan the barcode on the label, apply the label to the products and place...
Replies
8
Views
5,203
hi guys, i would like to put an running hour counter in the program of a ml1200 plc to be viewed on a hmi, but i am not to sure what instruction...
Replies
36
Views
18,038
buen dia. tengo una falla al pasar los tags de mi plc SLC 5 0/4 a mi panel me aparece un error Problem writing value " " to item <tag name>...
Replies
1
Views
65
Will someone please convert this logic to pdf?
Replies
2
Views
118
Back
Top Bottom