Flags Related To Tasks - Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Using Tasks
Instructions Not
Allowed in Interrupt
Tasks
2-2-3

Flags Related to Tasks

Flags Related to
Cyclic Tasks
Task Flags
(TK00 to TK31)
Task 3
Task Flag for task 3
Note
Initial Task Execution Flag
(A200.15)
62
The following instructions cannot be placed in interrupt tasks. Any attempt to
execute one of these instructions in an interrupt task will cause the ER Flag to
turn ON and the instruction will not be executed.The following instructions can
be used if an interrupt task is being used as an extra task.
Mnemonic
TKON(820)
TKOF(821)
STEP
SNXT
STUP
DI
EI
The operation of the following instructions is unpredictable in an interrupt task:
TIMER: TIM and TIMX(550), HIGH-SPEED TIMER: TIMH(015) and
TIMHX(551), ONE-MS TIMER: TMHH(540) and TMHHX(552), ACCUMULA-
TIVE TIMER: TTIM(087) and TTIMX(555), MULTIPLE OUTPUT TIMER:
MTIM(543) and MTIMX(554), LONG TIMER: TIML(542) and TIMLX(553),
TIMER WAIT: TIMW(813) and TIMWX(816), HIGH-SPEED TIMER WAIT:
TMHW(815) and TMHWX(817), PID CONTROL: PID(190), FAILURE POINT
DETECTION: FPD(269), and CHANGE SERIAL PORT SETUP: STUP(237).
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
Disabled
Task Flags are used only with cyclic tasks and not with interrupt tasks. With
an interrupt task, A441.15 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 A441.00 to
A441.07.
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.
Disabled
Task n
Initial Task
Execution Flag
TASK ON
TASK OFF
STEP DEFINE
STEP NEXT
CHANGE SERIAL PORT SETUP
DISABLE INTERRUPT
ENABLE INTERRUPT
Cycle
READY
Ready
Ready
Disabled
Section 2-2
Instruction
Cycle
Standby

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents