![background image](http://html.mh-extra.com/html/omron/sysmac-cp-series/sysmac-cp-series_user-manual_742262097.webp)
5-17
5 I/O Memory
CP2E CPU Unit Software User’s Manual(W614)
5-8 In
de
x R
egister
s (IR)
5
5-8
Index Registers (IR)
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.
These are different from the I/O memory area addresses in the CIO Area, DM Area, etc. They are the
continuous RAM addresses.
The user cannot directly input PLC memory addresses in the Index Registers. Use MOVR to convert a
regular data area address to its equivalent PLC memory address and write that value to the specified
Index Register. (Use MOVRW to set the PLC memory address of a timer/counter PV in an Index Regis-
ter.)
Index register numbers range from IR0 to IR15.
z
Indirect Addressing
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. Basi-
cally, 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.
I/O memory addresses for IR, DR, and Condition Flags, however, cannot be held.
•
In addition to basic indirect addressing, the PLC memory address in an Index Register can be off-
set with a constant or Data Register, auto-incremented, 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 or MOVRW and then modified as pointers in each instruction.
For pointer operation, either special instructions that can directly specify Index Registers (MOVR,
MOVRW, increment instructions, decrement instructions, or math instructions) are used, or indirect
offsets, auto-incrementing, or auto-decremented is used.
Overview
Notation
Range
Details
IR
Index regi
s
ter n
u
m
b
er: 13
Index regi
s
ter de
s
ign
a
tor: IR
13
Содержание SYSMAC CP Series
Страница 1: ...USER S MANUAL Cat No W614 E1 01 SYSMAC CP Series CP2E E D CP2E S D CP2E N D CP2E CPU Unit Software ...
Страница 3: ......
Страница 32: ...1 Overview 1 4 CP2E CPU Unit Software User s Manual W614 ...
Страница 44: ...3 CPU Unit Operation 3 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 116: ...6 I O Allocation 6 8 CP2E CPU Unit Software User s Manual W614 ...
Страница 144: ...7 PLC Setup 7 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 170: ...10 Interrupts 10 14 CP2E CPU Unit Software User s Manual W614 ...
Страница 200: ...11 High speed Counters 11 30 CP2E CPU Unit Software User s Manual W614 ...
Страница 272: ...12 Pulse Outputs 12 72 CP2E CPU Unit Software User s Manual W614 ...
Страница 278: ...13 PWM Outputs 13 6 CP2E CPU Unit Software User s Manual W614 ...
Страница 460: ...18 Programming Device Operations 18 28 CP2E CPU Unit Software User s Manual W614 ...
Страница 576: ...Revision 2 CP2E CPU Unit Software User s Manual W614 ...
Страница 577: ......