7-15
7 High-speed Counters
CJ2M CPU Unit Pulse I/O Module User’s Manual
7-2 High-speed Counter Inputs
7
7-2-2 Counting Mode Settings
Input pulses are counted in a loop within the set range.
• If the count is incremented from the maximum ring count, the count will be reset to 0 automatically
and incrementing will continue.
• If the count is decremented from 0, the count will be set to the maximum ring count automatically and
decrementing will continue.
Consequently, underflows and overflows cannot occur when Ring Mode is used.
z Ring Counter Maximum Value
The maximum value of the counting range for the input pulses can be set in the PLC Setup or by
executing the INI(880) instruction to change the maximum ring count.
The maximum ring count can be set to any value between 0000 0001 and FFFF FFFF hex (1 to
4,294,967,295 decimal).
The values that are set will be stored in the following words.
Precautions for Correct UsePrecautions for Correct Use
• There are no negative values in Ring Mode.
• If the maximum ring count is set to 0, the counter will operate with a ring counter maximum
value of FFFF FFFF hex.
• The ring counter maximum value cannot be changed while the comparison operation is in
progress.
• If a value that exceeds the ring counter maximum value is registered in the comparison table,
the comparison operation will not started.
• When the ring counter maximum value is changed, the PV of the high-speed counter will be
cleared to 0.
Additional Information
If necessary, execute the INI(880) instruction to change the ring counter maximum value.
Ring Mode
Pulse I/O Module No. Set value Auxiliary Area words
0 (on the right) High-speed Counter 0 Ring Counter
Maximum Value
A10137 (upper digits) and A10136
(lower digits)
High-speed Counter 1 Ring Counter
Maximum Value
A10139 (upper digits) and A10138
(lower digits)
1 (on the left) High-speed Counter 2 Ring Counter
Maximum Value
A10141 (upper digits) and A10140
(lower digits)
High-speed Counter 3 Ring Counter
Maximum Value
A10143 (upper digits) and A10142
(lower digits)
0
2
32
-1
Count value
Maximum ring
count