5 Understanding Programming
5-28
CJ2 CPU Unit Software User’s Manual
Interrupt processing is performed at the CPU Unit in PLCs containing Special I/O Units or CPU Bus
Units. Settings do not have to be made at the CPU Unit unless the program contains an external inter-
rupt task for a particular task number. The Special I/O Unit or CPU Bus Unit must be connected in the
CPU Rack to enable external interrupts.
Receiving external interrupt tasks is always enabled. The maximum number of tasks is 256 (interrupt
task numbers 0 to 255).
Example: External Interrupt from a CJ1W-CT021 High-speed Counter Unit
To communicate to the CPU Unit the status information for the two external control inputs and 32 out-
puts of this Unit for other than I/O refreshing, set the external control inputs or outputs so that they trig-
ger the external interrupt task.
Precautions for Correct UsePrecautions for Correct Use
Do not use the same number for more than one interrupt task.
If an external interrupt task (0 to 255) has the same number as a power OFF task (task 1),
scheduled interrupt task (task 2 or 3), or I/O interrupt task (100 to 131), the interrupt task will be
executed for either interrupt condition (external interrupt or the other interrupt condition).
z External Interrupts from Pulse I/O Modules
When a Pulse I/O Module is used with a CJ2M CPU Unit, external interrupt tasks can be executed
based on the results of comparison for high-speed counter inputs. With target comparison, the com-
parison conditions (target values and counting directions) are registered in the CTBL(882) compari-
son table along with the corresponding interrupt task number. The specified interrupt task will be
executed when the high-speed counter PV matches the registered target value.
External Interrupts
Input
(Interrupt Input Unit retrieval)
Interrupt task execution
Input ON delay time
I/O interrupt task
interrupt response time
Cycle execution task execution
(main program)
Ready for next
interrupt Input Unit retrieval
Ladder program
execution time
Cyclic task
return time
CJ1W-CT021
CPU Unit
Cyclic task
Interrupt task
I/O memory
Specifies
external interrupt
task number and
requests
interrupt
processing.
Data