Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 96

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Using Tasks
Note
Task Start Flag (A200.14)
Flags Related to All Tasks
Task Error Flag (A295.12)
The Initial Task Execution Flag tells whether or not the cyclic tasks are being
executed for the first time. This flag can thus be used to perform initialization
processing within the tasks.
Initial Task Execution Flag
A200.15
Initializing
processing
Even though a Standby cyclic task is shifted back to READY status through
the TKON(820) instruction, this is not considered an initial execution and the
Initial Task Execution Flag (A200.15) will not turn ON. The Initial Task Execu-
tion Flag (A200.15) will also not turn ON if a cyclic task is shifted from Dis-
abled to RUN status or if it is put in Standby status by another task through the
TKOF(821) instruction before the right to execute actually is obtained.
The Task Start Flag can be used to perform initialization processing each time
the task cycle is started. The Task Start Flag turns OF whenever cycle task
status changes from Disabled (INI) or Standby (WAIT) status to READY status
(whereas the Initial Task Execution Flag turns ON only when status changes
from Disabled (INI) to READY).
Disabled
Task n
Task Start Flag
The Task Start Flag can be used to perform initialization processing whenever
a task goes from Standby to RUN status, i.e., when a task on Standby is
enabled using the TRON(820) instruction.
Task Start Flag
A200.14
Initialization
processing
The Task Error Flag will turn ON if one of the following task errors occurs.
• No cyclic tasks (including extra cyclic tasks) are READY during a cycle.
• The program allocated to a cyclic task (including extra cyclic tasks) does
not exist. (This situation will not occur when using the CX-Programmer.)
• No program is allocated to an activated interrupt task.
Ready
Ready
Disabled
Section 2-2
63

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents