7 High-speed Counters
7-14
CJ2M CPU Unit Pulse I/O Module User’s Manual
The pulse + direction input method uses a direction signal and a pulse signal. The count is incre-
mented or decremented depending on the status (ON or OFF) of the direction signal.
Additional Information
The count of a high-speed counter can be monitored to see if it is currently being incremented or
decremented. The count direction can be read from the Auxiliary Area. The count in the current
cycle is compared with the count in the previous cycle to determine if it is being incremented or
decremented.
The results are reflected in the High-speed Counter Count Direction Flags.
The counter direction can also be monitored by using the PRV(881) instruction to read counter
status.
The following counting modes can be selected for high-speed counters: Linear Mode, which counts in a
fixed range, and Ring Mode, which counts in a set range to a specified maximum value.
Input pulses can be counted in the range between the lower limit and upper limit values. If the pulse
count goes beyond the lower/upper limit, an underflow/overflow will occur and counting will stop.
• Increment Mode
• Up/Down Mode
Pulse + Direction Inputs
Conditions for Incrementing/Decre-
menting the Count
Pulse I/O Module
No.
High-speed counter
Address of High-speed
Counter Count Direction Flag
0 (on the right) High-speed counter 0 A274.10
High-speed counter 1 A275.10
1 (on the left) High-speed counter 2 A320.10
High-speed counter 3 A321.10
7-2-2 Counting Mode Settings
Linear Mode
22 11 0076876554433
Pulse
Direction
Direction Pulse Count value
No change
No change
No change
No change
No change
No change
Decremented
Incremented
· The count is incremented when the
direction signal is ON and
decremented when it is OFF.
· Only rising edges are counted.
OFF
ON
ON
OFF
ON→OFF
ON→OFF
OFF→ON
OFF→ON
ON
OFF
OFF
ON
ON→OFF
ON→OFF
OFF→ON
OFF→ON
0
(000000 hex)
4294967295
(FFFFFFFF hex)
PV overflow
+2147483647
(7FFFFFFF hex)
-2147483648
(80000000 hex)
0
(00000000 hex)
PV underflow
PV overflow