160
Using Tasks Section 4-2
Tasks and the Execution Cycle
A cyclic task (including an extra cyclic task) that is in READY status will main-
tain that status in subsequent cycles.
A cyclic task that is in Standby status will maintain that status in subsequent
cycles. The task will have to be activated using the TKON(820) instruction in
order to switch from Standby to READY status.
If a TKOF(821) instruction is executed for the task it is in, the task will stop
being executed where the instruction is executed, and the task will shift to
Standby status.
Cyclic Task Numbers and the Execution Cycle (Including Extra Cyclic Tasks)
If task m turns ON task n and m > n, task n will go to READY status the next
cycle.
Example:If task 5 turns ON task 2, task 2 will go to READY status the next
cycle.
If task m turns ON task n and m < n, task n will go to READY status the same
cycle.
Example:If task 2 turns ON task 5, task 5 will go to READY status in the same
cycle.
Cyclic task 1
Cyclic task 2
READY sta-
tus at the
start of op-
eration
Cyclic task 1
Cyclic task 2
READY status
READY
status
READY status
TKON(820)
Cyclic task 1
Cyclic task 2
Cyclic task 1Standby status
RUN status
Standby status
Cyclic task 2 RUN status
TKOF(821)
TKON (820)
Task 2
Task execution will
stop here and the task
will shift to Standby
status.