Spectrum Controls 140 EHC 204 00sc User Manual
Page 55
![background image](/manuals/742156/55/background.png)
Quantum Series 140 EHC 204 00sc 140 EHC 208 00sc
56
Sample Configuration
Simple Bi-Directional Ring Counter:
The figure below demonstrates ring counter operation. In a ring counter operation, the count
value changes between zero and maximum. If, when counting up, the counter reaches the maximum
value, it rolls over to zero. If, when counting down, the counter reaches zero, it rolls under to the
maximum value.
Rollover
Ring Counter
Maximum Value
Zero
Count Down
Count Up
This configuration will allow the user to count from a minimum value of 0 to the counter
maximum value. Each time a revolution has occurred the counter limit flag will be set. Your ladder
program may use this flag to increment an accumulator, thus counting revolutions. The flag must be
reset before another complete revolution occurs otherwise the accumulator can not be incremented.
A bi-directional ring counter is configured by setting the preset and limit to the same valueand
setting the roll over to zero and roll under to preset bits. Zero must always be the starting point and
the maximum value must always be positive.
The above figure illustrates counting in a clockwise direction. The ring counter may also count
in a counterclockwise direction by toggling the counter direction bit (bit 12 4x 2-9).