3 - 10 3 - 10
MELSEC-Q/QnA
3 CONFIGURATION OF INSTRUCTIONS
3.3 Index Modification
(1) Index modification
(a) Index modification is an indirect setting made by using an index register.
When an index modification is used in a sequence program, the device to be used will
become the device number designated directly plus the contents of the index register.
For example, if D2Z2 has been designated the designated device is calculated as follows:
D(2+3)=D5 and the content of Z2 is 3 become the designated device.
(b) There are 16 index registers, from Z0 to Z15.
Each index register can be set between -32768 and 32767.
The data D10Z0
=
D {10 + (-1)}
D9, is stored at D0
X0
MOV K-1 Z0
X0
MOV D10Z0 D0
Index modification
The value -1 is stored at Z0
Example
A case where index modification has been performed, and the actual process device, would be
as follows: (When Z0 = 20 and Z1 = -5)
Ladder Example Actual Process Device
X0
MOV K20 Z0
MOV K-5 Z1
X1
MOV K100Z0 W53Z1
X1
MOV K120 W04E
Description
K100Z....K (100+20) = K120
W53.......W (53-5) = W4E
Hexadecimal number
X0
MOV K20 Z0
MOV K-5 Z1
X1
MOV K2X50Z0 K1M38Z1
X1
MOV K2X64 K1M33
Description
K2X50Z....K2X (50+14) = K2X64
K1M38......K1M (38-5) = K1M33
K20 is converted to hexadecimal
X0
MOV K20 Z0
MOV K-5 Z1
X1
MOV D0Z0 K3Y12FZ1
X1
MOV D20 K3Y12A
Description
D0Z.........D (0+20) = D20
K3Y12F... K3Y (12F-5) = K3Y12A
Hexadecimal number
Fig. 3.7 Ladder Example and Actual Process Device
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com