48
Comparison Output Function with Counter
Overview
Counter current value is compared with pre-set comparison output set
value, and the comparison result is output. This function is available in
all counter operation modes, but in this example the counter is used in
direction control mode.
Timing Diagram
Count value changes according to the input status of each signal as
illustrated below.
Pulse train input
Direction control signal input
(CH0 IN-A)
(CH0 IN-B)
(CH0 clear)
(CH0 Mask)
0V (24V DC)
Install Pulse I/O unit in slot No.0
R0
R1
R2
R3
Occupied I/O areas
Clear instruction
Mask instruction
Current
value
Set
value
Comparison
coincidence signal
Comparison
coincidence
output (CMP0)
CMP0
When counter current value coincides with
set value, and the comparison result is
output on CMP0.
CH0 IN-A (R0.0)
CH0 IN-B (R0.1)
CH0 Clear (R0.2)
CH0 Mask (R0.3)
Comparison
output set value
Count value
Count increases with
R0.0 pulse edge rising
and direction control
Count decreases with
direction control ON.
Count increases with
direction control OFF.
Reset count value
with clear signal ON.
CMP signal ON
when coincidence
or excess.
EQ signal ON
only on
coincidence
Count stops on
mask signal ON
Comparison output
point CMP0 (R2.0)
Coincidence
EQ0
(Internal signal)