DVP - ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

M1002

RST M1081

X20

FLT D0 D12

X21

DFLT D0 D20

Program Example 2:

1.When M1081 = ON, the source data is converted from floating point value to BIN integer. (Decimal ignored)

2.When X20 = ON, D1 and D0 (floating point) are converted to D12 (BIN integer). If D0 (D1) = H47C35000, the result will be 100,000 which exceeds the available range of BIN integer in 16-bit register D12. In this case the result will be D12 = K32767, and M1022 = ON

3.When X21 = ON, D1 and D0 (floating point) are converted to D21, D20 (BIN integer). If D0 (D1) = H47C35000, the result is 100,000 and will be saved in 32-bit register D20 (D21).

M1002

SET M1081

X20

FLT D0 D12

X21

DFLT D0 D20

Program Example 3:

Apply FLT instruction to complete the following operation

(D10)

(X7~X0)

 

K61.5

 

16-bit BIN

2-digit BCD

 

 

 

 

6

1

 

2

 

 

5

4

 

 

 

 

 

 

 

 

 

 

 

 

 

(D101,D100) (D200) BIN

(D301,D300)

Binary floating point

 

 

 

Binary floating point

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(D203,D202) Binary floating point

(D401,D400) Binary floating point

(D21,D20) Binary floating point

7 (D31,D30)

Decimal floating point

8

(for monitoring)

 

(D41,D40) 32-bit integer

3 - 116

Page 232
Image 232
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Apply FLT instruction to complete the following operation