Interrupt Tasks - Omron CJ2 - 02-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

5 Understanding Programming
5-2-3

Interrupt Tasks

Interrupt tasks can be executed at any time in the cycle if any of the following conditions are in effect.
If an interrupt occurs, the interrupt task will be executed at any point in the cycle regardless of whether
the CPU Unit is currently executing an instruction in a cyclic task, refreshing I/O, or performing periph-
eral servicing.
Types of Interrupt Tasks
The following types of interrupt tasks can be used.
• Power OFF Interrupt Task
The power OFF interrupt task will be executed immediately before the power is turned OFF.
• Scheduled Interrupt Tasks
A scheduled interrupt task is used in programs that require scheduling execution of certain parts of
the user program, such as for monitoring the operation status at constant intervals.
• I/O Interrupt Tasks
An I/O interrupt task will be executed when an input to an Interrupt Input Unit connected to the CPU
Unit turns ON.
• External Interrupt Tasks
An external interrupt task will be executed when an interrupt is requested by an Special I/O Unit or
CPU Bus Unit.
• Extra Cyclic Tasks
Extra cyclic tasks are interrupt tasks treated as cyclic tasks. In this case, the purpose is not interrupt
processing, as is the case for other interrupt tasks, but to increase the number of cyclic tasks. Up to
128 cyclic tasks can be used. If extra cyclic tasks are used, however, up to 384 cyclic tasks can be
used.
List of Interrupt Tasks
Task
Power OFF Interrupt
Task
Scheduled Interrupt
*1
Tasks 0 and 1
I/O Interrupt Tasks 0
*2
to 31
External Interrupts 0
*3
to 255
Extra Cyclic Tasks 0
to 255
*1 The scheduled interrupt tasks cannot be used if synchronous unit operation is being used.
*2 The Interrupt Input Unit must be connected in the CPU Rack. I/O Interrupt Units connected elsewhere cannot
be used to request execution of I/O interrupt tasks.
*3 The Special I/O Unit or CPU Bus Unit must be connected in the CPU Rack. Units connected elsewhere cannot
be used to generate external interrupts.
5-20
Task No.
Execution condition
1
Turing OFF the CPU Unit
2 and 3
Each lapse of specific time on
internal timer of CPU Unit
100 to 131
Input bit from an Interrupt Input
Unit on the CPU Rack turning
ON
0 to 255
When requested by a Special
I/O Unit or CPU Bus Unit on the
*3
CPU Rack
0 to 255
Every cycle while in the task is
in READY status. (Task Con-
trol Instructions must be used.)
Related settings
• OFF interrupt tasks for PLC setup
• Use the MSKS(690) (SET INTER-
RUPT MASK) instruction to set the
interrupt interval. (1 to 9999)
• See Scheduled Interrupt Time Units
in PLC Setup. (10 ms/1.0 ms/0.1 ms)
• Use the MSKS(690) (SET INTER-
RUPT MASK) instruction to assign
inputs from Interrupt Input Units on
the CPU Rack.
None (always valid)
None (always valid)
CJ2 CPU Unit Software User's Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents