DVP-ES2/SX2/SS2/SA2/SX2/SE Operation Manual – Programming

Destination value

= 500

D

= 30

S1

=500

Source value

0

 

 

 

Program Example 2:

1.Assume source value S1 = 500, max. source value D0 = 3000, min. source value D1 = 200, max. destination value D2 = 30, and min. destination value D3 = 500. When X0 = ON, SCLP instruction executes and the result of proportional calculation will be stored in D10.

2.Equation: D10 = [(500 – 200) × (30 – 500)] ÷(3000 – 200) + 500 = 449.64. Rounding off the result into an integer, D10 = 450.

X0

MOV K3000 D0

MOV K200 D1

MOV K30 D2

MOV K500 D3

X0

SCLP K500 D0 D10

Destination value

= 500

D

= 30

 

S1=500

Source value

0

 

3 - 458

Page 574
Image 574
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Destination value =500 Source value