10-11
10 Interrupts
CP2E CPU Unit Software User’s Manual(W614)
10-3 Scheduled Interrupts
10
10-3-2 Flow of Operation
z Writing the Interrupt Task Program
Create the program for interrupt task 1, which is executed for the scheduled interrupt. Right-click a
program in the CX-Programmer and select Properties. Select Interrupt Tasks 01 (scheduled inter-
rupt) in Task Type Field of the Program Properties Dialog Box.
z Execute MSKS in a Cyclic Task
The MSKS instruction must be executed from the ladder program in a cyclic task in order to use
scheduled interrupts.
The MSKS instruction must be executed only once to make the settings, so in general execute
MSKS in just one cycle using the upwardly differentiated variation of the instruction.
10-3-2 Flow of Operation
Write the program for the corresponding interrupt task 1 (fixed).
Use MSKS to specify the scheduled interrupt interval.
The setting can be 1 ms or longer.
Set N to 4 or 14 in the MSKS instruction.
Writing the Ladder Program
Execute MSKS
instruction in a cyclic
task
Interrupt task
Create
ladder
program
@MSKS
N
C
Execution condition
Specifies scheduled interrupt (interrupt task 1)
Sets the scheduled interrupt interval and starts timing