Omron CJ - PROGRAMMING MANUAL 08-2008 Programming Manual page 212

Programmable controllers
Hide thumbs Also See for CJ - PROGRAMMING MANUAL 08-2008:
Table of Contents

Advertisement

Using Tasks
Relationship of Tasks to
Timer Operation
Relationship of Tasks to
Condition Flags
174
• Other words and bits in I/O Memory are shared by all tasks. CIO 001000
for example is the same bit for both cyclic task 1 and cyclic task 2. There-
fore, be very careful in programming any time I/O memory areas other
than the IR and DR Areas are used because values changed with one
task will be used by other tasks.
CIO, Auxiliary, Data Memory and all other mem-
ory areas except the IR and DR Areas. (See
note 1.)
Index registers (IR) and data registers (DR) (See
note 2.)
Note
1. The current EM bank is also shared by tasks. Therefore if the current EM
bank number is changed with cyclic task 1 for example, the new current EM
bank number will be valid for cyclic task 2 as well.
2. IR and DR values are not set when interrupt tasks (including extra cyclic
tasks) are started. If IR and DR are used in an interrupt task, these values
must be set by the MOVR/MOVRW (MOVE TO REGISTER and MOVE
TIMER/COUNTER PV TO REGISTER) instructions within the interrupt
task. After the interrupt task has been executed, IR and DR will return to
their values prior to the interrupt automatically.
Timer present values for TIM, TIMX, TIMH, TIMHX, TMHH, TMHHX, TIMU,
TIMUX (See note.), TMUH, TMUHX (See note.), TIMW, TIMWX, TMHW, and
TMHWX programmed for timer numbers 0000 to 2047 will be updated even if
the task is switched or if the task containing the timer is changed to Standby
status or back to READY status.
If the task containing TIM goes to Standby status and is the returned to
READY status, the Completion Flag will be turned ON if the TIM instruction is
executed when the present value is 0. (Completion Flags for timers are
updated only when the instruction is executed.) If the TIM instruction is exe-
cuted when the present value is not yet 0, the present value will continue to be
updated just as it was while the task was in READY status.
Note These instructions are supported by the CJ1-H-R CPU Units only.
• The present values for timers programmed with timer numbers 2048 to
4098 will be maintained when the task is in Standby status.
All Condition Flags will be cleared before execution of each task. Therefore
Condition Flag status at the end of task 1 cannot be read in task 2. CCS(282)
and CCL(283) can be used to read Condition Flag status from another part of
the program, e.g., from another task.
Note The CS1G/H-CPU@@(-V1) and CJ1@-CPU@@ CPU Units do not
support CCS(173) and CCL(172).
Note When the status of Condition Flags is monitored from a Programming Con-
sole, the Programming Console will show the flags' status at the end of the
cycle, i.e., their status at the end of the last task in the cycle.
I/O memory
Section 4-2
Relationship to tasks
Shared with other tasks.
Used separately for each task.

Advertisement

Table of Contents
loading

Table of Contents