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.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

124 D EXP P Float exponent operation<br />

Controllers<br />

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

SE<br />

Type<br />

Bit Devices Word devices Program Steps<br />

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

S * * *<br />

D *<br />

Operands:<br />

S: Exponent D: <strong>Operation</strong> result<br />

DEXP, DEXPP: 9 steps<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 />

Explanations:<br />

1. The base is e = 2.71828 and exponent is S<br />

2. EXP [ S +1, S ] = [ D +1, D ]<br />

3. Both positive and negative values are valid for S. Register D has to be 32-bit format. <strong>Operation</strong><br />

is conducted in floating point value, so the value in S needs to be converted into floating value<br />

before exponent operation.<br />

4. The content in D: e S , e =2.71828 and S is the specified exponent..<br />

5. Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag).<br />

If absolute value of the result is larger than max. floating value, carry flag M1022 = ON.<br />

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

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

Program Example:<br />

1. When M0 = ON, convert (D1, D0) to binary floating value and save the result in (D11, D10).<br />

2. When M1= ON, perform exponent operation with (D11, D10) as the exponent. The value is<br />

saved in register (D21, D20) in binary floating format.<br />

3. When M2 = ON, convert the value in (D21, D20) into decimal floating point value and save the<br />

result in (D31, D30). (At this time, D31 indicates powers of 10 for D30)<br />

M0<br />

RST M1081<br />

M1<br />

M2<br />

DFLT D0 D10<br />

DEXP D10 D20<br />

DEBCD D20 D30<br />

3-307

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

Saved successfully!

Ooh no, something went wrong!