![Omron CJ1G-CPU series Programming Manual Download Page 37](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489037.webp)
16
Description of Tasks
Section 1-6
Executable and Standby
Status
The TASK ON and TASK OFF instructions (TKON(820) and TKOF(821)) can
be executed in one task to place another task in executable or standby status.
Instructions in tasks that are on standby will not be executed, but their I/O sta-
tus will be maintained. When a task is returned to executable status, instruc-
tions will be executed with the I/O status that was maintained.
Example: Programming with a Control Task
In this example, task 0 is a control task that is executed first at the start of
operation. Other tasks can be set from the CX-Programmer (but not a Pro-
gramming Console) to start or not to start at the beginning of operation.
Once program execution has been started, tasks can be controlled with
TKON(820) and TKOF(821).
Task 0 (control task)
Task 1
Task 2
Task 3
Task 0
Example: T
(set in the program properties from the CX-Programmer).
ask 0 is set to be executed at the start of operation
Task 1 is executable when a is ON.
Task 1 is put on standby when b is ON.
Tasks 2 and 3 are executable when c is ON.
Tasks 2 and 3 are put on standby when d is ON.
Program
Task 0
Task 1
Task 2
Task 3
Task 0
Task 1
Task 2
Task 3
Task 0
Task 1
Task 2
Task 3
Task 0
Task 1
Task 2
Task 3
Task 0
Task 1
Task 2
Task 3
Task 0
Task 1
Task 2
Task 3
Start task 1
when a is
ON.
Start tasks 2
and 3 when
c is ON.
Put task 1 on
standby when
b is ON.
Put tasks 2
and 3 on
standby
when d is
ON.
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...