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

Program Example 3:<br />

1. Assume the source value S 1 , D100 = F500, max. source value D0 = F3000, min. source value<br />

D2 = F200, max. destination value D4 = F500, and min. destination value D6 = F30. When X0<br />

= ON, M1162 is set up to adopt floating point operation. DSCLP instruction executes and the<br />

result of proportional calculation will be stored in D10.<br />

2. Equation: D10 = [(F500 – F200) × (F500 – F30)] ÷ (F3000 – F200) + F30 = F80.35. Round off<br />

the result into an integer, D10 = F80.<br />

X0<br />

SET<br />

M1162<br />

DMOVR<br />

DMOVR<br />

DMOVR<br />

DMOVR<br />

DMOVR<br />

F500<br />

F3000<br />

F200<br />

F500<br />

F30<br />

D100<br />

D0<br />

D2<br />

D4<br />

D6<br />

X0<br />

DSCLP D100 D0 D10<br />

Points to note:<br />

1. Range of S 1 for 16-bit instruction: max. source value ≥ S 1 ≥ min. source value; -32,768 ~<br />

32,767. If the value exceeds the bounds, the bound value will be used for calculation.<br />

2. Range of integer S 1 for 32-bit instruction: max. source value ≥ S 1 ≥ min. source value;<br />

-2,147,483,648 ~ 2,147,483,647. If the value exceeds the bounds, the bound value will be<br />

used for calculation.<br />

3. Range of floating point S 1 for 32-bit instruction: max. source value ≥ S 1 ≥ min. source value;<br />

adopting the range of 32-bit floating point. If the value exceeds the bounds, the bound value<br />

will be used for calculation.<br />

4. When adopting the slope equation, please note that the Max. source value must be larger than<br />

the min. source value. However the max. destination value does not need to be larger than the<br />

min. destination value.<br />

3-459

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

Saved successfully!

Ooh no, something went wrong!