beautypg.com

Delta DVP-ES2 User Manual

Page 573

background image

3 . I n s t r u c t i o n S e t

3 - 4 5 7

6.

Substitute the above parameters into y = kx + b and the operation instruction can be obtained.

y = kx + b = D = k S

1

+ b = slope × S

1

+ offset = slope × S

1

+ min. destination value – min.

source value × slope = slope × (S

1

– min. source value) + min. destination value = (S

1

– min.

source value) × (max. destination value – min. destination value) ÷ (max. source value – min.

source value) + min. destination value

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

be set as min. source value. When the source value and parameters are set, the following

output figure can be obtained:

D

1

Min. destination value

Max. Destination value

Destination value

Source value

Max.
source value

Min.
source value

Program Example 1:

1.

Assume source value S

1

= 500, max. source value D0 = 3000, min. source value D1 = 200,

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

instruction executes and the result of proportional calculation will be stored in D10.

2.

Equation: D10 = [(500 – 200) Ч (500 – 30)] ч (3000 – 200) + 30 = 80.35. Rounding off the

result into an integer, D10 =80.

X0

SCLP

K500

D0

D10

X0

MOV

MOV

MOV

MOV

K3000

K200

K500

K30

D0

D1

D2

D3

This manual is related to the following products: