4 index registers (i, j) – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 60

4.4 Registers (Variables)
4.4.4 Index Registers (i, j)
4-19
Programming
4
4.4.4 Index Registers (i, j)
There are two index registers, i and j, that are used to modify relay and register addresses. The functions of i and j are
identical.
There are index registers for each program type, as shown in the following figure.
∗ Motion programs and sequence programs have separate i and j registers for each task.
Functions reference the i and j registers that belong to the calling drawing.
For example, a function called by DWG.H will reference the i and j registers for DWG.H.
The operation for each register data type is described next.
[ a ] Attaching an Index to a Bit Register
[ b ] Attaching an Index to an Integer Register
[ c ] Attaching an Index to a Double-length Integer or a Real Number Register
i and j registers
i and j registers
i and j registers
DWG.H
DWG.L
Motion
program*
i and j registers
Sequence
program*
i and j registers
DWG.A
i and j registers
DWG.I
If i = 2,
DB000000 = MB00000i.
DB000000 = MB00002
Using an index is the same as adding
the value of i or j to the register address.
For example, if i = 2, MB00000i is
the same as MB00002.
Equivalent
If i = 30,
DW000000 = MW00001i.
DW000000 = MW00031
Using an index is the same as adding
the value of i or j to the register address.
For example, if i = 30, MW00001i is
the same as MW00031.
Equivalent
Using an index is the same as adding the value of i or
j to the register address.
For example, if j = 1, ML00000j is the same as ML00001.
Similarly, if j = 1, MF00000j is the same as MF00001.
In the case of double-length integers and real numbers, the
one-word area of the register address and the one-word
area of the register address + 1 are used together. Be
careful of overlapping areas when indexing
double-length integer or real number register
addresses. For example, when using ML00000j with
both j = 0 and j = 1, the one-word area of MW00001 will
overlap.
Double-length Integer
Real Number
If j = 0, ML00000j is ML00000.
If j = 1, ML00000j is ML00001.
If j = 0, MF00000j is MF00000.
If j = 1, MF00000j is MF00001.
Upper word
MW00001
Lower word
MW00000
Upper word
MW00001
MW00002
MW00001
MW00002
MW00001
Lower word
MW00000