80
CPM1/CPM1A Interrupt Functions Section 1-6
Reset Methods
Either of the two methods described below may be selected for resetting the
PV of the count (i.e., setting it to 0).
Z-phase signal + software reset:
The PV is reset when the Z-phase signal (reset input) is turned ON while
the High-speed Counter Reset Bit (SR 25200) is ON.
Software reset:
The PV is reset when the High-speed Counter Reset Bit (SR 25200) is
turned ON.
Note The High-speed Counter Reset Bit (SR 25200) is refreshed once every cycle,
so in order for it to be read reliably it must be ON for at least one cycle.
The “Z” in “Z-phase” is an abbreviation for “Zero.” It is a signal that shows that
the encoder has completed one cycle.
High-speed Counter Interrupt Count
For high-speed counter 0 interrupts, a comparison table is used instead of a
“count up.” The count check can be carried out by either of the two methods
described below. In the comparison table, comparison conditions (for compar-
ing to the PV) and interrupt routine combinations are saved.
Target value:
A maximum of 16 comparison conditions (target values and count direc-
tions) and interrupt routine combinations are saved in the comparison ta-
ble. When the counter PV and the count direction match the comparison
conditions, then the specified interrupt routine is executed.
No. Operation timing Reset
(1) Z-phase signal turns ON when
SR 25200 turns OFF.
Not reset.
(2) Z-phase signal turns ON within one
cycle after SR 25200 turns ON.
Not reset.
(3) Z-phase signal turns ON after at least
one cycle elapses after SR 25200
turns ON.
Reset with Z-phase leading edge.
(4) Z-phase signal turns ON within one
cycle after SR 25200 turns OFF.
Reset with Z-phase leading edge.
(5) SR 25200 turns ON when Z-phase
signal is ON.
Not reset.
(1) (2) (3) (4) (5)
Z-phase
25200
CPU processing
1 cycle
Not reset Not reset Not resetReset
Reset
I/O refresh
Program
execution
Program
execution
Program
execution
Program
execution
Program
execution
Program
execution
Common processing,
communications servicing, etc.
Z-phase Signal + Software Reset