31
Interrupt Functions
Section 1-4
Unmasking Interrupts
Use the INT(89) instruction to unmask interrupts as follows:
1-4-5
Interval Timer Interrupts
High-speed, high-precision timer interrupt processing can be executed using
interval timers. The CQM1H provides three interval timers, numbered from 0
to 2.
Note
1.
Interval timer 0 cannot be used when pulses are being output to a Transis-
tor Output Unit by means of the SPED(64) instruction.
2.
Interval timer 2 cannot be used at the same time as high-speed counter 0.
Processing
There are two modes for interval timer operation, the One-shot Mode, in
which only one interrupt will be executed when time expires, and the Sched-
uled Interrupt Mode in which the interrupt is repeated at a fixed interval.
Procedure
Follow the steps outlined below when using interval timer interrupts.
1,2,3...
1.
Determine whether the timer will operate in one-shot mode or scheduled
interrupt mode.
2.
Program the associated program sections.
a) Use STIM(69) to set the timer SV and start the timer in one-shot or
scheduled interrupt mode.
b) Write an interrupt subroutine within SBN(92) and RET(93).
Note
1.
Interval timer 2 and high-speed counter 0 cannot be used at the same time.
2.
Interval timer 0 cannot be used at the same time as pulse outputs from
Transistor Output Units produced by SPED(64).
(@)INT(89)
200
000
000
Generate interrupt.
Interval timers 0 to 3
(See notes 1 and 2.)
Start the timer.
One-shot mode
Scheduled interrupt mode
Read elapsed time.
Ladder Program
INTERVAL TIMER
Execute specified subroutine.