Yaskawa MotionSuite Series Machine Controller Programming Manual User Manual

Page 178

Advertising
background image

MotionSuite™ Series Machine Controller Programming Manual

Chapter 5: Variables (Registers)

5-6

!

!

!

! Important Points During Variable Calculations

1. An error occurs in the following program:

2. When a type of data is stored in a different variable, the following results occur:

3. When storing real number data in an integer number variable, the value will be

rounded-off. Values of x.50 and less are rounded down; values of x.51 and more are

• Integer data is stored in a bit variable

MB000100=123;
MB000100=MW00100;

• When real number data is stored in an integer number variable:

MB000100=MF00200;
(00001) (1.234)
The real number value is stored by converting to an integer number.

• When real number data is stored in a 32-bit integer number variable:

ML000100=MF00200;
(1234567) (123456.7)
The real number value is stored by converting to an integer number.

• When 32-bit integer number data is stored in an integer number variable:

MW000100=ML00200;
(1234567) (123456.7)
The lower-level 16bit of the 32-bit integer number data is stored
untouched.

• When integer number data is stored in a 32-bit integer number variable:

ML000100=MW00200;
(0001234) (1234)
The integer number data is stored by converting to a 32-bit integer
number.

Advertising