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>SX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> – Programming<br />

API Mnemonic Operands Function<br />

202 SCAL P<br />

Type<br />

Proportional<br />

calculation<br />

Controllers<br />

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

SE<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 1 * * *<br />

S 2 * * *<br />

S 3 * * *<br />

D *<br />

Operands:<br />

SCAL,SCLAP: 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 />

S 1 : Source value S 2 : Slope (unit: 0.001) S 3 : Offset D: <strong>Operation</strong> result<br />

Range of operands S 1 , S 2 , S 3 : -32768~32767.<br />

Explanations:<br />

1. SCAL instruction performs a proportional calculation according to the internal slope equation.<br />

2. <strong>Operation</strong> equation in the instruction: D = (S 1 × S 2 ) ÷ 1000 + S 3<br />

3. Users have to obtain S 2 and S 3 (decimals are rounded up into 16-bit integers) by using the<br />

slope and offset equations below.<br />

Slope equation: S 2 = [(max. destination value – min. destination value) ÷ (max. source value –<br />

min. source value)] × 1,000<br />

Offset equation: S 3 = min. destination value – min. source value × S 2 ÷ 1,000<br />

4. The output curve is shown as the figure:<br />

Destination value<br />

Max. Destination value<br />

D<br />

Min.<br />

source value<br />

Max.<br />

source value<br />

Source value<br />

Min. destination value<br />

3-454

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

Saved successfully!

Ooh no, something went wrong!