Flags Related To Tasks - Omron CJ - PROGRAMMING MANUAL 12-2009 Programming Manual

Programmable controllers
Table of Contents

Advertisement

Using Tasks
4-2-3

Flags Related to Tasks

Flags Related to Cyclic Tasks
Task Flags
(TK00 to TK31)
Task 3
Disabled
Task Flag for task 3
Initial Task Execution Flag
(A20015)
178
TXD(236), RECEIVE: RXD(235), and PROTOCOL MACRO: PMCR(260),
EXPLICIT MESSAGE SEND: EXPLT(270), EXPLICIT GET ATTRIBUTE:
EGATR(271), EXPLICIT SET ATTRIBUTE: ESATR(272), EXPLICIT WORD
READ: ECHRD(273), EXPLICIT WORD WRITE: ECHWR(274), TRANSMIT
VIA SERIAL COMMUNICATIONS UNIT: TXDU(256), and RECEIVE VIA
SERIAL COMMUNICATIONS UNIT: RXDU(255).
The following flag work only for normal cyclic tasks. They do not work for extra
cyclic tasks.
A Task Flag is turned ON when a cyclic task in READY status and is turned
OFF when the task is in Disabled (INI) or in Standby (WAIT) status. Task num-
bers 00 to 31 correspond to Task Flags TK00 to TK31.
Cycle
READY
Note Task Flags are used only with cyclic tasks and not with interrupt tasks. With
an interrupt task, A44115 will turn ON if an interrupt task executes after the
start of operation, and the number of the interrupt task that required for maxi-
mum processing time will be stored in two-digit hexadecimal in A44100 to
A44107.
The Initial Task Execution Flag will turn ON when cyclic tasks shift from Dis-
abled (INI) to READY status, the tasks obtain the right to execute, and the
tasks are executed the first time. It will turn OFF when the first execution of the
tasks has been completed.
Task n
Initial Task
Execution Flag
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.
Note 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 (20015) will not turn ON. The Initial Task Execution
Cycle
READY
Ready
Disabled
Disabled
Initial Task Execution Flag
Initializing
processing
Section 4-2
Cycle
Standby
Ready

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents