beautypg.com

Subscripts attached to double integer data, Subscripts attached to real number data – Yaskawa MP940 User Manual

Page 88

background image

3.6 Registers

3-41

3

„

Subscripts Attached to Double Integer Data

When a subscript is attached to double integer data, the value of I or J is added to the register
number. For example, if I = 1, ML00000i will be the same as ML00001. ML00000j when J
= 0, and ML00000j when J = 1 will be as follows:

„

Subscripts Attached to Real Number Data

When a subscript is attached to real number data, the value of I or J is added to the register
number. For example, if I = 1, MF00000i will be the same as MF00001. MF00000j when J =
0, and MF00000j when J = 1 will be as follows:

Programming Example Using Subscripts

The programming code shown in the following figure sets the sum of 100 registers from
MW00100 to MW00199 in MW00200 using subscript J.

Fig 3.10 Programming Example Using a Subscript

Subscripts I and J cannot be used in motion programs.

• Subscripts I and J must be initialized.
• Subscripts I and J are treated as unsigned values. Do not use numbers smaller than 0.

MW00001

MW00000

MW00002

MW00001

Higher-place

word

Lower-place

word

ML00000J when J = 0: ML00000

ML00000J when J = 1: ML00001

MW00001

MW00000

MW00002

MW00001

Higher-place

word

Lower-place

word

MF00000J when J = 0: MF00000

MF00000J when J = 1: MF00001

00000

FOR J = 00000 to 00099 by 00001

MW00200 + MW00100j

FEND

MW00200

MW00200

INFO