725
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Interrupt Control Instructions
3
CLI
(3) Clearing or Holding High-speed Counter Interrupt Causes (N = 10 or 13)
When N is 10 or 13, CLI(691) clears or retains the recorded high-speed counter interrupt cause
(either target-value or range comparison) for the built-in high-speed counter interrupt specified by
N. (CJ1M and CJ2M CPU Units Only)
Note CJ1M CPU Units support only high-speed counter inputs 0 and 1.
Precautions
• Scheduled interrupt tasks cannot be used for CJ2H CPU Units if synchronous unit operation is
being used. An instruction error will occur if the CLI instruction is executed with N set to 4 or 5.
Example Programming
z Specifying I/O Interrupts for the CS1W-INT01 or CJ1W-INT01
When CIO 0.00 is ON in this example, CLI(691) clears or holds the recorded causes for the interrupt
inputs from Interrupt Input Unit 0.
z Setting the Time to the First Scheduled Interrupt
1 When W0.00 goes from OFF to ON, CLI(691) sets the time to
the first execution of scheduled interrupt 0 to 24 ms. (In this
case, the scheduled interval time unit is set to 1 ms in the
PLC Setup.)
2 When W0.01 goes from OFF to ON, CLI(691) sets the time to
the first execution of scheduled interrupt 0 to 12 ms, and
starts the internal timer. (In this case, the scheduled time
interval units are set to 1 ms in the PLC Setup.)
CL1
0
D100
0.00
N
S
1111
15 14 13 12
0101
11 10 9 8
1111
7654
00
10
3210
F5 F2
D100
0: Recorded interrupt input retained
1: Recorded interrupt input cleared
@CLI
4
&24
W0.00
@MSKS
4
&12
W0.01
N
C
N
C
Scheduled interrupt 0 (interrupt task 2)
12 ms 12 ms
24 ms
Cyclic task
1. Execution of CLI(691)
(Sets 24 ms to first task.)
2. Execution of CLI(691)
(Enables interrupt and sets 12 ms.)