17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

M1002<br />

RST<br />

M1081<br />

X20<br />

X21<br />

FLT D0 D12<br />

DFLT D0 D20<br />

Program Example 2:<br />

1. When M1081 = ON, the source data is converted from floating point value to BIN integer.<br />

(Decimal ignored)<br />

2. When X20 = ON, D1 and D0 (floating point) are converted to D12 (BIN integer). If D0 (D1) =<br />

H47C35000, the result will be 100,000 which exceeds the available range of BIN integer in<br />

16-bit register D12. In this case the result will be D12 = K32767, and M1022 = ON<br />

3. When X21 = ON, D1 and D0 (floating point) are converted to D21, D20 (BIN integer). If D0<br />

(D1) = H47C35000, the result is 100,000 and will be saved in 32-bit register D20 (D21).<br />

M1002<br />

SET<br />

M1081<br />

X20<br />

X21<br />

FLT D0 D12<br />

DFLT D0 D20<br />

Program Example 3:<br />

Apply FLT instruction to complete the following operation<br />

(D10) (X7~X0) K61.5<br />

16-bit BIN 2-digit BCD<br />

6<br />

(D21,D20)<br />

Binary floating point<br />

1 2 5<br />

(D101,D100) (D200) BIN<br />

Binary floating point<br />

3<br />

4<br />

(D301,D300)<br />

Binary floating point<br />

7<br />

8<br />

(D31,D30)<br />

Decimal floating point<br />

(for monitoring)<br />

(D41,D40)<br />

32-bit integer<br />

(D203,D202)<br />

Binary floating point<br />

(D401,D400)<br />

Binary floating point<br />

3-116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!