34
Interrupt Functions
Section 1-4
Application Example
In this example, an interrupt is executed every 2.4 ms (0.6 ms x 4) by means
of interval timer 1. Assume the default settings for all of the PC Setup. (Inputs
are not refreshed for interrupt processing.)
When the program is executed, subroutine 023 will be executed every 2.4 ms
while IR 00100 is ON.
1-4-6
High-speed Counter 0 Interrupts
Pulse signals from a pulse encoder to CPU bits 00004 through 00006 can be
counted at high speed using high-speed counter 0 (the built-in high-speed
counter), and interrupt processing can be executed according to the count.
Input Signal Types and
Input Modes
Two types of signals can be input from a pulse encoder. The input mode used
for high-speed counter 0 will depend on the signal type.
RET(93)
MOV(21)
#0004
DM 0010
MOV(21)
#0006
DM 0011
SBN(92) 023
@STIM(69)
004
DM 0010
#0023
@STIM(69)
011
000
000
00100
00100
Every 2.4 ms the count is reached for interval
timer 1, subroutine 023 is called, and the inter-
rupt processing is executed.
Interval timer set values:
Sets 4 for the decrementing counter
set value.
Sets 0.6 ms for the decrementing time inter-
val.
Interval timer 1 starts when IR 00100 turns ON.
Interval timer 1 stops when IR 00100 turns
OFF.
25315 First Cycle Flag
ON for 1 cycle
IR 00100
Subroutine 023
2.4 ms
2.4 ms
2.4 ms
Mode
Operation
Differential
phase mode
A phase-difference 4X two-phase signal (phase-A and phase-B) and
a phase-Z signal are used for inputs. The count is incremented or
decremented according to differences in the 2-phase signals.
Incrementing
mode
One single-phase pulse signal and a count reset signal are used for
inputs. The count is incremented according to the single-phase sig-
nal.
Содержание SYSMAC CQM1H Series
Страница 3: ...iv...
Страница 5: ...vi...
Страница 9: ......
Страница 11: ......
Страница 15: ...xvi...
Страница 87: ...62 Calculating with Signed Binary Data Section 1 7...
Страница 169: ...144 Serial Communications Board Section 2 6...
Страница 537: ......
Страница 565: ......
Страница 569: ......
Страница 573: ......
Страница 577: ......