Index Registers - Omron SYSMAC CS Series Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Index Registers

9-22 Index Registers

Indirect Addressing
The sixteen Index Registers (IR0 to IR15) are used for indirect addressing.
Each Index Register can hold a single PLC memory address, which is the
absolute memory address of a word in I/O memory. Use MOVR(560) to con-
vert a regular data area address to its equivalent PLC memory address and
write that value to the specified Index Register. (Use MOVRW(561) to set the
PLC memory address of a timer/counter PV in an Index Register.)
Note Refer to Appendix C Memory Map for more details on PLC memory
addresses.
When an Index Register is used as an operand with a "," prefix, the instruction
will operate on the word indicated by the PLC memory address in the Index
Register, not the Index Register itself. Basically, the Index Registers are I/O
memory pointers.
• All addresses in I/O memory (except Index Registers, Data Registers, and
Condition Flags) can be specified seamlessly with PLC memory
addresses. It isn't necessary to specify the data area.
• In addition to basic indirect addressing, the PLC memory address in an
Index Register can be offset with a constant or Data Register, auto-incre-
mented, or auto-decremented. These functions can be used in loops to
read or write data while incrementing or decrementing the address by one
each time that the instruction is executed.
With the offset and increment/decrement variations, the Index Registers can
be set to base values with MOVR(560) or MOVRW(561) and then modified as
pointers in each instruction.
Set to a base value
with MOVR(560) or
MOVRW(561).
Note It is possible to specify regions outside of I/O memory and generate an Illegal
Access Error when indirectly addressing memory with Index Registers. Refer
to Appendix C Memory Map for details on the limits of PLC memory
addresses.
I/O Memory
Pointer
Section 9-22
465

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1g/h-cpu_hCs1g/h-cpu_-ev1

Table of Contents