3. Instructions
716
CS/CJ/NSJ Series Instructions Reference Manual (W474)
z Example for Scheduled Interrupts
1. When W0.00 goes from OFF to ON in the following example, MSKS(690) sets a 15 ms time interval
for scheduled interrupt 0, and starts the internal timer. (In this case, the scheduled time interval units
are set to 1 ms.)
2. When W0.01 goes from OFF to ON, the internal timer is stopped for scheduled interrupt 0, which
stops the generation of timer interrupts.
1. Execution of MSKS(690)
(Interrupt enabled, 15 ms)
Cyclic task
15 ms
Scheduled interrupt task number 2
15 ms 15 ms
15 ms
@MSKS
4
&15
W0.00
4
&0
W0.01
N
C
N
C
2. Execution of MSKS(690)
(Interrupt stopped)
@MSKS