42
Interrupt Functions
Section 1-4
DM 0005: 0000
DM 0006: 0102 — Comparison 2 interrupt subroutine: 102
When the program is executed, operation will be as follows:
1-4-7
High-speed Counter 0 Overflows/Underflows
If the allowable counting range for high-speed counter 0 is exceeded, and
underflow or overflow status will occur and the counter’s PV will remain at
0FFF FFFF for overflows and FFFF FFFF for underflows until the overflow/
underflow status is cleared by resetting the counter. The allowable counting
ranges are as follows:
Differential phase mode: F003 2768 to 0003 2767
Incrementing Mode: 0000 0000 to 0006 5535
Note
1.
The values given above are theoretical and assume a reasonably short cy-
cle time. The values will actually be those that existed one cycle before the
overflow/underflow existed.
25315 (ON for 1 scan)
SBN(92) 101
SPED(64)
020
001
#0020
SPED(64)
020
001
#0000
25313 (Always ON)
SBN(92) 102
25313 (Always ON)
CTBL(63)
000
000
DM 0000
SPED(64)
020
001
#0050
Saves the comparison table in target matching format,
and begins comparing.
Begins continuous pulse output to IR10002 at 500 Hz.
When the high-speed counter value reaches 1000, subroutine
101 is called and the frequency of the pulse output is changed to
200 Hz.
When the high-speed counter value reaches 2000, subroutine 102
is called and the pulse output is stopped by setting the frequency
to 0.
RET(93)
RET(93)
0
200
500
Pulse frequency (Hz)
Time elapsed (s)