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.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

135 D ATAN P Arc Tangent<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: Source device (binary floating value) D: <strong>Operation</strong> result<br />

DATAN, DATANP: 9<br />

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. ATAN instruction performs arc tangent operation on S and stores the result in D<br />

2. ATAN value=TAN -1<br />

3. See the figure below for the relation between the input and the result:<br />

R<br />

S: Input (TAN value)<br />

R: Result (ATAN value)<br />

2<br />

0<br />

S<br />

-<br />

2<br />

4. If operation result in D is 0, Zero flag M1020 = ON.<br />

Program Example:<br />

When X0 = ON, DATAN instruction performs arc tangent operation on the binary floating value in<br />

(D1, D0) and stores the ATAN value in (D11, D10) in binary floating format.<br />

X0<br />

DATAN<br />

D0<br />

D10<br />

D1<br />

D0<br />

Binary floating point<br />

D11 D10 ATAN value<br />

binary floating point<br />

3-325

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

Saved successfully!

Ooh no, something went wrong!