Indexing - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

3.3

Indexing

(1) Overview of indexing
(a) Indexing is an indirect setting made by using an index register.
When an Indexing is used in a sequence program, the device to be used will become the device number specified
directly plus the contents of the index register.
For example, if D2Z2 has been specified, the specified device is calculated as follows: D(2+3) = D5 and the content
of Z2 is 3 become the specified device.
(b) Indexing with 32-bit index registers in addition to 16-bit index registers is available with the Universal model QCPU
and LCPU.
(2) Indexing with 16-bit index registers
(a) Example of indexing
Each index register can be set between -32768 and 32767.
Indexing is performed in the way shown below:
X0
MOV
X0
MOV
(b) Devices to which indexing can be used
With the exception of the restrictions noted below, Indexing can be used with devices used with contacts, coils,
basic instructions, and application instructions.
1) Devices to which indexing can not be used
Device
E
$
.
FX, FY, FD
P
I
Z
S
TR
BL
*1:
SFC transfer devices and SFC block devices are devices for SFC use.
Refer to the manual below for how to use these devices.
• MELSEC-Q / L / QnA Programming Manual (SFC)
2) Devices with limits for use with index registers
Device
T
C
Stores -1 at Z0.
K
1
Z0
Stores the data of D10Z0=
D10Z0
D0
D{10+(-1)} = D9 at D0.
Indexing
Meaning
Floating decimal point data
Character string data
Bit designated for word device
Function devices
Pointers used as labels
Interrupt pointers used as labels
Index register
Step relay
SFC transfer devices*1
SFC block devices*1
Meaning
• Only Z0 and Z1 can be used for timer
contacts and coils.
• Only Z0 and Z1 can be used for
counter contacts and coils.
Application Example
T0Z0
K100
T1Z1
C0Z1
K100
C1Z0
2
3
4
5
6
7
8
91

Advertisement

Table of Contents
loading

Table of Contents