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

134 D ACOS P Arc Cosine<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 (binary floating value) D: <strong>Operation</strong> result<br />

DACOS, DACOSP: 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. ACOS instruction performs arc cosine operation on S and stores the result in D<br />

2. ACOS value = COS -1<br />

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

R<br />

S: Input (COS value)<br />

R: Result (ACOS value)<br />

2<br />

-1,0<br />

0 1,0<br />

S<br />

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

5. The decimal value of the COS value designated by S should be within -1.0 ~ +1.0. If the value<br />

exceeds the range, M1067 and M1068 will be ON and instruction will be disabled.<br />

Program Example:<br />

When X0 = ON, DACOS instruction performs arc cosine operation on the binary floating value in (D1,<br />

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

X0<br />

DACOS<br />

D0<br />

D10<br />

3-323

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

Saved successfully!

Ooh no, something went wrong!