Manual

Chapter 5: Ladder Program Examples 45
Sample
Configuration
Simple Ring Counter
w/ Flags (20k Limit):
This configuration for the counter module will allow the user to count from
a minimum value of 0 to a limit value of 20,000 counts 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.
Channel 0 Output Register Configuration (O:e.0)
Config. Bit Description Bit Setting Description
*15 Normal 0 Normal Mode
14 Roll Under 1 Preset
13 Roll Over 1 Roll to Zero
12 Direction 0 (Default) No Inversion
11 Count Size 0 (Default) ±32K
10 Freq. Filter 0 (Default) 50kHz
9 Stop on Limit 0 No Stop
8 Stop on Zero 0 (Default) N/A
6/7 Count Mode 00 (Default) Uni-Directional
4/5 Input Range 00 (Default) 50mV-30VAC
3 Rate Mode 0 (Default) Instant
2 Reset Flags 0 (Default) Toggle each Rev.
1 Counter Preset 0 (Default) Off
Output Word - O:e.1 Counter Preset= 20,000
Output Word - O:e.2 Counter Limit = 20,000
A ring counter is configured by setting the preset and limit values to the
same count and 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.
Rollover
Flag Set
on Each
Revolution
20K Ring Counter
020,000
Count Up