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 />

API Mnemonic Operands Function<br />

118 D EBCD P Float to scientific conversion<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE<br />

<strong>SX2</strong><br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F DEBCD, DEBCDP: 9<br />

S * steps<br />

D *<br />

Operands:<br />

S: Source device D: Conversion result<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Explanation<br />

1. The instruction converts the binary floating point value in S to decimal floating point value and<br />

stores the results in the register specified by D.<br />

2. PLC floating point is operated by the binary floating point format. DEBCD instruction is the<br />

specific instruction used to convert binary floating point to decimal floating point.<br />

3. Flag: M1020 Zero flag, M1021 Borrow flag, M1022 Carry flag<br />

If absolute value of the result exceeds the max. floating point value, carry flag M1022 = ON.<br />

If absolute value of the result is less than the min. floating point value, borrow flag M1021 = ON.<br />

If the conversion result is 0, zero flag M1020 = ON.<br />

Program Example:<br />

When X0 = ON, the binary floating point value in D1, D0 will be converted to decimal floating point<br />

and the conversion result is stored in D3, D2.<br />

X0<br />

DEBCD<br />

D0<br />

D2<br />

Binary<br />

Floating Point<br />

D1<br />

D0<br />

23 bits for real number, 8 bits for exponent<br />

1 bit for sign bit<br />

Exponent Real number<br />

Decimal<br />

D3 D2<br />

Floating Point<br />

Real number Exponent<br />

[D2] * 10 [D3]<br />

3-300

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

Saved successfully!

Ooh no, something went wrong!