Index Registers - Omron CJ - 08-2008 Operation Manual

Programmable controllers
Table of Contents

Advertisement

Index Registers

Indirect Addressing
File Memory Conversion

9-17 Index Registers

428
Words in the EM Area can be indirectly addressed in two ways: binary-mode
and BCD-mode.
Binary-mode Addressing (@E)
When a "@" character is input before a EM address, the content of that EM
word is treated as binary and the instruction will operate on the EM word in
the same bank at that binary address. All of the words in the same EM bank
(E00000 to E32767) can be indirectly addressed with hexadecimal values
0000 to 7FFF and words in the next EM bank (E00000 to E32767) can be
addressed with hexadecimal values 8000 to FFFF.
@E1_00100
@E00100
BCD-mode Addressing (*E)
When a "*" character is input before a EM address, the content of that EM
word is treated as BCD and the instruction will operate on the EM word in the
same bank at that BCD address. Only part of the EM bank (E00000 to
E09999) can be indirectly addressed with BCD values 0000 to 9999.
*E1_00100
*E00100
Part of the EM Area can be converted for use as file memory with settings in
the PLC Setup. All EM banks from the specified bank (EM File Memory Start-
ing Bank) to the last EM bank will be converted to file memory.
Once EM banks have been converted to file memory, they cannot be
accessed (read or written) by instructions. An Illegal Access Error will occur if
a file-memory bank is specified as an operand in an instruction.
The following example shows EM file memory when the EM File Memory
Starting Bank has been set to 3 in the PLC Setup.
EM bank number
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 D Memory Map of PLC Memory Addresses for more details
on PLC memory addresses.
0200
E1_00512
Address actually used.
0200
E0_00512
Address actually used.
0200
E1_00200
Address actually used.
0200
E0_00200
Address actually used.
Example:
EM File Memory Starting Bank
set to 3 in the PLC Setup
EM file memory
(Cannot be accessed
from instructions.)
Section 9-17
(When the current
bank is bank 0.)
(When the current
bank is bank 0.)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents