Omron SYSMAC CS/CJ Series Programming Manual page 176

Table of Contents

Advertisement

Task Features
External Interrupt Tasks
Extra Cyclic Tasks (CS1-H,
CJ1-H, or CJ1M CPU Units
Only)
Note
mounted elsewhere cannot be used to request execution of I/O interrupt
tasks.
I/O interrupts are not supported by CJ1 CPU Units.
An external interrupt task will be executed when requested by an Special I/O
Unit, CPU Bus Unit, or Inner Board (CS Series only) user program. Special
I/O Units and CPU Bus Units, however, must be mounted to the CPU Rack.
The Special I/O Unit or CPU Bus Unit must be mounted to the CPU Rack. For
CJ1-H CPU Units, the Unit must be connected as one of the five Units next to
the CPU Unit (slots 0 to 4). For CJ1M CPU Units, the Unit must be connected
as one of the three Units next to the CPU Unit (slots 0 to 2). Units mounted
elsewhere cannot be used to generate external interrupts.
The maximum number of external interrupt tasks is 256 (Interrupt task num-
bers: 0 to 255). If an external interrupt task has the same number as a power
OFF, scheduled, or I/O interrupt task, the interrupt task will be executed for
either condition (the two conditions will operate with OR logic) but basically
task numbers should not be duplicated.
I/O interrupts are not supported by CJ1 CPU Units.
An interrupt tasks can be executed every cycle, just like the normal cyclic
tasks. Extra cyclic tasks (interrupt task numbers 0 to 255) are executed start-
ing at the lowest task number after execution of the normal cyclic task (cyclic
task numbers 0 to 31) has been completed. The maximum number of extra
cyclic tasks is 256 (Interrupt task numbers: 0 to 255). Cycle interrupt tasks,
however, are different from normal cyclic tasks in that they are started with the
TKON(820)instruction. Also, the TKON(820)and TKOF instructions cannot be
used in extra cyclic tasks, meaning that normal cyclic tasks and other extra
cyclic tasks cannot be controlled from within an extra cyclic task.
If an extra cyclic task has the same number as a power OFF, scheduled, or I/O
interrupt task, the interrupt task will be executed for either condition (the two
conditions will operate with OR logic). Do not use interrupt tasks both as nor-
mal interrupt tasks and as extra cyclic tasks.
1. The power OFF interrupt task in 1) above has priority and will be executed
when power turns OFF even if another interrupt task is being executed.
2. If another interrupt task is being executed when a scheduled, I/O, or exter-
nal interrupt occurs, then these interrupt tasks will not be executed until the
interrupt task that is currently being executed has been completed. If mul-
tiple interrupts occur simultaneously, then interrupt tasks will be executed
sequentially starting at the lowest interrupt task number.
3. The differences between normal cyclic tasks and extra cyclic tasks are list-
ed in the following table.
Item
Activating at startup
Using TKON/TKOF
instructions inside task
Task Flags
Initial Task Execution
Flag (A20015) and
Task Start Flag
(A20014)
Index (IR) and data
(DR) register values
Extra cyclic tasks
Setting is not possible.
Possible.
Not supported.
Not supported.
Not defined when task is
started (same as normal
interrupt tasks). Values
set in the previous cycle
cannot be read.
Section 4-1
Normal cyclic tasks
Set from CX-Programmer
Not possible.
Supported.
Supported.
Undefined at the beginning
of operation. Values set in
the previous cycle can be
read.
155

Advertisement

Table of Contents
loading

Table of Contents