142
Index Registers
Section 4-11
(2) If two-word data is accessed from the last address in the DM Area (D9999
for the CP1L-L
@
D
@
-
@
and D32767 for other CPU Units), the Access Er-
ror Flag (P_AER) will turn ON and the data at D9999 or D32767 will not
be read or written.
DM Fixed Allocation
Words for Modbus-RTU
Easy Master
The following DM area words are used as command and response storage
areas for the Modbus-RTU Easy Master function.
D32200 to D32299: Serial port 1 on CP1L CPU Unit with M CPU type
D32300 to D32399: Serial port 2 on CP1L CPU Unit with M CPU type and
serial port 1 on CP1L CPU Unit with L CPU type
For use of these areas, refer to
6-3-3 Modbus-RTU Easy Master Function
.
4-11 Index Registers
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 E Memory Map
for more details on PLC memory
addresses.
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. 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. 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 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.
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 E Memory Map
for details on the limits of PLC memory
addresses.
I/O Memory
Pointer
Set to a base value
with MOVR(560) or
MOVRW(561).
Summary of Contents for CP1L - 12-2007
Page 3: ...iv...
Page 9: ...x...
Page 13: ...xiv TABLE OF CONTENTS...
Page 21: ...xxii...
Page 33: ...xxxiv Conformance to EC Directives 6...
Page 65: ...32 Function Blocks Section 1 5...
Page 428: ...395 Clock Section 6 9...
Page 429: ...396 Clock Section 6 9...
Page 523: ...488 Troubleshooting Unit Errors Section 9 4...
Page 531: ...496 Replacing User serviceable Parts Section 10 2...
Page 563: ...528 Auxiliary Area Allocations by Function Appendix C...
Page 611: ...576 Auxiliary Area Allocations by Address Appendix D...
Page 638: ...603 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 639: ...604 Connections to Serial Communications Option Boards Appendix F...
Page 669: ...634 Index...
Page 671: ...636 Revision History...