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

6. Substitute the above parameters into y = kx + b and the operation instruction can be obtained.<br />

y = kx + b = D = k S 1 + b = slope × S 1 + offset = slope × S 1 + min. destination value – min.<br />

source value × slope = slope × (S 1 – min. source value) + min. destination value = (S 1 – min.<br />

source value) × (max. destination value – min. destination value) ÷ (max. source value – min.<br />

source value) + min. destination value<br />

7. If S 1 > max. source value, S 1 will be set as max. source value. If S 1 < min. source value, S 1 will<br />

be set as min. source value. When the source value and parameters are set, the following<br />

output figure can be obtained:<br />

Destination value<br />

Max. Destination value<br />

D<br />

Min.<br />

source value<br />

1<br />

Max.<br />

source value<br />

Source value<br />

Min. destination value<br />

Program Example 1:<br />

1. Assume source value S 1 = 500, max. source value D0 = 3000, min. source value D1 = 200,<br />

max. destination value D2 = 500, and min. destination value D3 = 30. When X0 = ON, SCLP<br />

instruction executes and the result of proportional calculation will be stored in D10.<br />

2. Equation: D10 = [(500 – 200) × (500 – 30)] ÷ (3000 – 200) + 30 = 80.35. Rounding off the<br />

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

X0<br />

MOV<br />

K3000<br />

D0<br />

MOV<br />

K200<br />

D1<br />

MOV<br />

K500<br />

D2<br />

MOV<br />

K30<br />

D3<br />

X0<br />

SCLP K500 D0 D10<br />

3-457

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

Saved successfully!

Ooh no, something went wrong!