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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

125 D LN P Float natural logarithm operation<br />

Controllers<br />

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

SE<br />

<strong>SX2</strong><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: Source device D: <strong>Operation</strong> result<br />

DLN, DLNP: 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. Perform natural logarithm (LN) operation on operand S:<br />

LN[S +1, S ]=[ D +1, D ]<br />

2. Only a positive number is valid for S. Register D has to be 32-bit format. <strong>Operation</strong> is<br />

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

before natural logarithm operation.<br />

3. e D = S. The content of D = LN S, where the value in S is specified by users.<br />

4. 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 natural logarithm operation with (D11, D10) as the antilogarithm. The<br />

value is 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<br />

M1081<br />

M1<br />

M2<br />

DFLT D0 D10<br />

DLN D10 D20<br />

DEBCD D20 D30<br />

3-308

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

Saved successfully!

Ooh no, something went wrong!