Omron CJ2 CPU UNIT SOFTWARE User Manual page 111

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

Advertisement

Relationship of Tasks to I/O Memory
• I/O memory other than Index Registers (IR) and Data Registers (DR) is shared by the tasks. For
example, bit CIO 10.00 used in cyclic task 1 and bit CIO 10.00 used in cyclic task 2 refer to the same
bit in memory. If I/O memory other than Index Registers (IR) and Data Registers (DR) accessed by
more than one task, be sure to use sufficient caution when a value changed in one task is used in
another task.
• There are two different ways to use Index Registers (IR) and Data Registers (DR): 1) Independently
by task or 2) Shared by all task.
• With independent registers, IR0 used by cyclic task 1 for example is different from IR0 used by
cyclic task 2.
• With shared registers, IR0 used by cyclic task 1 for example is the same as IR0 used by cyclic
task 2.
The setting that determines if registers are independent or shared is made from the CX-Programmer.
CIO, Auxiliary, Data Memory and all other memory areas except the IR and DR
*1
Areas.
Index registers (IR) and data registers (DR)
*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 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 REG-
ISTER) 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.
CJ2 CPU Unit Software User's Manual
I/O memory
*2
5 Understanding Programming
Relationship to tasks
Shared with other tasks.
Used separately for each
task.
5
5-19

Advertisement

Table of Contents
loading

Table of Contents