3 how to use subscripts i, j – Yaskawa MP2300S Basic Module User Manual
Page 172

5.3 Registers
5.3.3 How to Use Subscripts i, j
5-39
Outline of Motion Control Systems
5.3.3 How to Use Subscripts i, j
Two type of registers (i, j) are available as dedicated registers to modify the relay and register numbers. Both i and j
have the same function. They are used when you want to handle a register number as a variable.
An example for each register data type is given as explanation.
( 1 ) Bit Type Attached with a Subscript
( 2 ) Integer Type Attached with a Subscript
( 3 ) Long Integer or Real Type Attached with a Subscript
Program example using subscript
Equivalent
The result is a relay number
added with i or j value.
For example, MB000000i for
i=2 is the same as MB000002.
Also, MB000000j for j=27 is
the same as MB00001B.
Equivalent
The result is a register number
added with i or j value.
For example, MW00010i for
i=3 is the same as MW00013.
Also, MW00001j for j=30 is
the same as MW00031.
The result is a register number with an
added i or j value.
For example, “ML00000j for j=1” is the
same as ML00001. Also, “MF00000j for
j=1” is the same as MF00001.
However, as a word indicated by a regis-
ter number is the lower word for a long
integer/real type, for the same ML00001
and MF00001, be aware that an upper/
lower word of ML00001 and MF00001
for j=0 may differ from those of
MW00001
MW00002
MW00000
MW00001
MW00001
MW00002
MW00000
MW00001
Upper word
Lower word
Upper word
Lower word
Long integer type
ML00000j for j = 0: ML00000
ML00000j for j = 1: ML00001
Real type
MF00000j for j = 0: MF00000
MF00000j for j = 1: MF00001
The left program uses a subscript j and
calculates the total amount of a hundred
registers from MW00100 to MW00199,
and stores the total amount in
MW00200.