35
Interrupt Functions
Section 1-4
Note
One of the methods in the following section should always be used to reset
the counter when restarting it. The counter will be automatically reset when
program execution is started or stopped.
The following signal transitions are handled as forward (incrementing) pulses:
phase-A leading edge to phase-B leading edge to phase-A trailing edge to
phase-B trailing edge. The following signal transitions are handled as reverse
(decrementing) pulses: phase-B leading edge to phase-A leading edge to
phase-B trailing edge to phase-A trailing edge.
The count range is from –32,767 to 32,767 for differential phase mode, and
from 0 to 65,535 for Incrementing Mode. Pulse signals can be counted at up
to 2.5 kHz in differential phase mode, and up to 5.0 kHz in incrementing
mode.
The differential phase mode always uses a 4X phase-difference input. The
number of counts for each encoder revolution would be 4 times the resolution
of the counter. Select the encoder based on the countable ranges.
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).
Note
The High-speed Counter 0 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 “phase-Z” is an abbreviation for “Zero.” It is a signal that shows that
the encoder has completed one cycle.
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
−
1
−
2
1
2
3
4
Phase-A
Phase-B
Differential phase mode
Count
Incremented
Decremented
Count
Pulse
input
Incrementing mode
Incremented only
Method
Operation
Phase-Z signal
+ software reset
The PV is reset when the phase-Z signal (reset input) turns ON
after the High-speed Counter 0 Reset Bit (SR 25200) is turned ON.
Software reset
The PV is reset when the High-speed Counter 0 Reset Bit
(SR 25200) is turned ON.
SR25200
Phase-Z
(reset input)
Phase-Z software reset
1 or more cycles
1 or more cycles
Reset by interrupt.
Within 1 cycle
Reset by cycle.
Not reset.
Reset by cycle.
Within 1 cycle
1 or more cycles
Software reset
SR25200