Omron CS1D DUPLEX SYSTEM - 10-2009 Operation Manual page 349

Cs1d duplex system
Table of Contents

Advertisement

Index Registers
Note
1,2,3...
MOV(021)
#0001
MOV(021)
#0020
Regular
data area
address
I/O memory
#0001
#0020
1. The PLC memory addresses are listed in the diagram above, but it isn't
necessary to know the PLC memory addresses when using Index Regis-
ters.
2. Auto-incrementing and auto-decrementing is performed when the instruc-
tion is executed. Caution is required when using instructions like OUT that
are constantly executed. (Refer to 1-1-5 Inputting Data in Operands in
SYSMAC CS/CJ-series Programmable Controllers Instructions Reference
Manual (W340) for details.)
Example:
MOVR(560)
000013
LD
P_Off
OUT
,IR0+
Above, OUT turns OFF CIO 000013 and IR0 is incremented to indicate
CIO 000014.
MOVR(560)
000013
LD
P_Off
SET
,IR0+
SET is executed only when the input condition is ON. Thus SET is not ex-
ecuted above and IR0 is not incremented.
Since some operands are treated as word data and others are treated as bit
data, the meaning of the data in an Index Register will differ depending on the
operand in which it is used.
1. Word Operand:
MOVR(560)
0000
MOV(021)
D00000
When the operand is treated as a word, the contents of the Index Register
are used "as is" as the PLC memory address of a word.
In this example MOVR(560) sets the PLC memory address of CIO 0002 in
IR2 and the MOV(021) instruction copies the contents of D00000 to
CIO 0002.
,IR0
Writes #0001 to the PLC memory ad-
dress contained in IR0.
+1,IR0 Reads the content of IR0, adds 1,
and writes #0020 to that PLC memo-
ry address.
PLC memory address
MOVE TO REGISTER instruction
MOVR(560) 0002 IR0
Pointer
IR0
IR0
IR2
IR2
Section 8-17
313

Advertisement

Table of Contents
loading

Table of Contents