Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 59

Advertising
background image

4.4 Registers (Variables)

4.4.3 Data Types

4-18

( 2 ) Precautions for Operations Using Different Data Types

If you perform an operation using different data types, the results will be different depending on the data type of the
storage register, as described below.

[ a ] Storing Real Number Data in an Integer Register

MW00100 = MF00200: The real number data is converted to integer data and stored in the destination register.
(00001) (1.234)

Œ

There may be rounding error due to storing a real number in an integer register.
Whether numbers are rounded or truncated when converting a real number to an integer can be set in the properties
of the drawing. (See below.)

MW00100 = MF00200 + MF00202:
(0124) (123.48) (0.02) The result of the operation may be different depending on the value of the variable.
(0123) (123.49) (0.01)

[ b ] Storing Real Number Data in a Double-length Integer Register

ML00100 = MF00200: The real number data is converted to integer data and stored in the destination register.
(65432) (65432.1)

[ c ] Storing Double-length Integer Data in an Integer Register

MW00100 = ML00200: The lower 16 bits of the double-length integer data are stored without change.
(-00001) (65535)

[ d ] Storing Integer Data in a Double-length Integer Register

ML00100 = MW00200: The integer data is converted to double-length integer data and stored in the destination register.
(0001234) (1234)

„

Setting for Real Number Casting

The casting method (truncating or rounding) can be set in the detailed definitions in the Program Property Dialog Box.
The method to use for real number casting is set for each drawing.

Advertising
This manual is related to the following products: