10 Interrupts
10-12
CP2E CPU Unit Software User’s Manual(W614)
Specifying MSKS Operands (N and C)
MSKS Operands
* Either is reset.
Example
Precautions for Correct UsePrecautions for Correct Use
• Set a scheduled interrupt interval is longer than the time required to execute the correspond-
ing interrupt task.
• If you shorten the scheduled interrupt interval and increase the execution frequency of the
scheduled interrupt task, the cycle time will increase, and this will affect the execution timing of
cyclic tasks.
• If an interrupt task is being executed for another interrupt (input interrupt or high-speed
counter interrupt) when the scheduled interrupt occurs, the scheduled interrupt will not be exe-
cuted until the other interrupt task had been completed.
Even in this case, measurement of internal timer is continually executed in parallel, so the exe-
cution of scheduled interrupt tasks will not be delayed.
• Scheduled interrupt interval cannot be changed during the startup of scheduled interrupt.
Change the interval after the scheduled interrupt has stopped.
MSKS Operands
N C
Interrupt number Scheduled interrupt interval
Scheduled interrupt (interrupt
task 1)*
14: Reset and restart
4: Reset and restart
0 decimal: Disable interrupt (stop internal timer)
10 to 9,999 decimal:Enable interrupt (Reset internal timer
and then start timer with interrupt interval between 1.0
and 999.9 ms)
MSKS
4
&10
END
END
Cyclic tasks
Scheduled Interrupt Time Unit
Scheduled interrupt
1 ms
In intervals of 1 ms
Interrupt task 1
Interrupt