Delta Electronics Programmable Logic Controller DVP-PLC User Manual
Page 577
![background image](/manuals/75807/577/background.png)
10 Application Instructions API 200-249
DVP-PLC Application Manual
10-3
Mnemonic
Operands
Function
203
D SCLP P
Parameter Proportional Value
Calculation
Controllers
ES/EX/SS SA/SX/SC EH/SV
Bit Devices
Word Devices
Program Steps
Type
OP
X Y M S K H
KnX KnY KnM KnS T
C
D
E
F
S
1
*
*
*
S
2
*
D
*
SCLP, SCLPP: 7 steps
DSCLP, DSCLPP: 13 steps
PULSE 16-bit 32-bit
ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV
Operands:
S
1
: Source value S
2
: Parameter D: Destination device
Explanations:
1. See the specifications of each model for the range of operands.
2. Flags: M1162 (decimal integer or binary floating point); M1162 = On -> Binary floating point
3. Settings
of
S
2
for 16-bit instruction:
S
2
occupies 4 consecutive devices in 16-bit instruction.
Device No.
Parameter
Range
S
2
Maximum source value
-32,768 ~ 32,767
S
2
+ 1
Minimum source value
-32,768 ~ 32,767
S
2
+ 2
Maximum destination value
-32,768 ~ 32,767
S
2
+ 3
Minimum destination value
-32,768 ~ 32,767
4. Settings
of
S
2
for 32-bit instruction:
S
2
occupies 8 consecutive devices in 32-bit instruction.
Range
Device No.
Parameter
Integer
Floating point
S
2
, S
2
+ 1
Maximum source value
S
2
+ 2, 3
Minimum source value
S
2
+ 4, 5
Maximum destination value
S
2
+ 6, 7
Minimum destination value
-2,147,483,648 ~
2,147,483,647
Range of 32-bit
floating point
5. Operation
equation
in the instruction: D = [(S
1
– min. source value) × (max. destination value – min. destination
value)] ÷ (max. source value – min. source value) + min. destination value
6. The operational relation between source value and destination value is as stated below:
y = kx + b
y= Destination value (D)
k= Slope = (max. destination value – min. destination value) ÷ (max. source value – min. source value)
x= Source value (S
1
)
b= Offset = Min. destination value – Min. source value × slope
Bring all the parameters into equation y = kx + b and obtain the equation in the instruction:
y = kx + b = D = k S
1
+ b = slope ×S
1
+ offset = slope ×S
1
+ min. destination value – min. source value × slope