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 1:<br />

1. Assume S 1 = 500, S 2 = 168 and S 3 = -4. When X0 = ON, SCAL instruction executes and the<br />

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

2. Equation: D0 = (500 × 168 ) ÷ 1000 + (-4) = 80<br />

X0<br />

SCAL K500 K168 K-4 D0<br />

Destination value<br />

D<br />

Offset=-4<br />

Slope=168<br />

0 1 = 500<br />

Source value<br />

Program Example 2:<br />

1. Assume S 1 = 500, S 2 = -168 and S 3 = 534. When X0 = ON, SCAL instruction executes and the<br />

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

2. Equation: D10 = (500 × -168 ) ÷ 1000+ 534 = 450<br />

X10<br />

SCAL K500 K-168 K534 D10<br />

Destination value<br />

D<br />

Offset = 534<br />

Slope = -168<br />

0<br />

S 1 = 500<br />

Source value<br />

Points to note:<br />

1. This instruction is applicable for known slope and offset. If slope and offset are unknown,<br />

please use SCLP instruction for the calculation.<br />

2. S 2 has to be within the range -32,768 ~ 32,767. If S 2 exceeds the applicable range, use SCLP<br />

instruction instead.<br />

3. When adopting the slope equation, the max source value must be larger than min source<br />

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

4. If D > 32,767, D will be set as 32,767. If D < -32,768, D will be set as -32,768.<br />

3-455

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

Saved successfully!

Ooh no, something went wrong!