6 Interrupts
6-2
CJ2M CPU Unit Pulse I/O Module User’s Manual
6-1 Types of Interrupts
CJ2M CPU Units normally repeat processes in the following order: overseeing processes, program exe-
cution, I/O refreshing, peripheral servicing. During the program execution stage, cyclic tasks (ladder
programs) are executed.
The interrupt function, on the other hand, allows a specified condition to interrupt a cycle and execute a
specified program. Interrupts can thus be used to perform high-speed processing that is not restricted
by the cycle time. The CJ2M CPU Unit performs the following:
(1) When an interrupt occurs, execution of the ladder programs in cyclic tasks is interrupted.
(2) The ladder program in the interrupt task is executed.
(3) When the interrupt task is finished, the ladder program that was being executed is returned to.
Interrupts are classified by the interrupt factor. There are the following three types of interrupts.
• Changes in status of inputs on Pulse I/O Module → 6-2 Interrupt Inputs
• PVs of high-speed counters → 7-3 High-speed Counter Interrupts
• Specified time interval for timer in the CPU Unit → Scheduled interrupts
(Refer to the CJ2 CPU Unit Software Manual
(Cat. No. W473).)
Additional Information
For information on using interrupt tasks, refer to the CJ2 CPU Unit Software User's Manual (Cat.
No. W473).
6-1-1 Overview
Interrupt Factors and Types of Interrupts
END
END
CJ2M CPU Unit
Cycle
Cyclic task
(ladder program)
I/O refresh
(1) Interrupt occurs.
(2) Interrupt task executed.
(3) When the interrupt task is finished, the
ladder diagram that was being
executed is returned to.
Ladder program