Omron CJ2 CPU UNIT SOFTWARE User Manual page 110

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

5 Understanding Programming
Tasks and the Execution Cycle
A cyclic task (including an extra cyclic task) that is in READY status will maintain that status in sub-
sequent cycles.
TASK ON
instruction
A cyclic task that is in STANDBY status will maintain that status in subsequent cycles. The task will
have to be turned ON using a TASK ON instruction in order to switch from STANDBY status to
READY status.
TASK ON
TASK OFF
instruction
instruction
If a TASK OFF instruction is executed for its own task, the task will stop being executed where the
TASK OFF instruction is executed, and the task will change to STANDBY status.
Task execution will
stop here and the
task will change to
STANDBY status.
Cyclic Task Numbers and the Execution Cycle
• If task m turns ON task n and m > n, task n will go to READY status at the next cycle.
Example: If task 5 turns ON task 2, task 2 will go to READY status at the next cycle.
• If task m turns ON task n and m < n, task n will go to READY status in the same cycle.
Example: If task 2 turns ON task 5, task 5 will go to READY status in the same cycle.
• If task m places task n in STANDBY status and m > n, will go to STANDBY status the next cycle.
Example: If task 5 places task 2 in STANDBY status, task 2 will go to STANDBY status the next
• If task m places task n in STANDBY status and m < n, task n will go to STANDBY status in the
same cycle.
Example: If task 2 places task 5 in STANDBY status, task 5 will go to STANDBY status in the
5-18
READY
status at
Cyclic task 1
the start of
operation
READY
Cyclic task 2
status
STANDBY
Cyclic task 1
status
Cyclic task 2
Task 2
TKOF 2
cycle.
same cycle.
Cyclic task 1
Cyclic task 2
Cyclic task 1
READY
Cyclic task 2
status
READY
status
READY
status
STANDBY status
READY status
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents