Chapter 16 PLC Function ApplicationsMH300
API
SCAL
Scale value operation
202
P
SCAL
Continuous
execution type
SCALP
Pulse
execution type
-
-
- -
Flag signal: none
S1
* *
*
S2
* *
*
S3
* *
*
D
*
Notes on operand usage:
Refer to the function specifications table for each device in series
for the scope of device usage.
S1: Data source. S2: Slope, unit: 0.001. S3: Offset. D: Destination device.
The operation equation in the instruction: D = (S1 × S2) ÷ 1000 + S3
To obtain the values in S2 and S3, users have to use the slope equation and the
offset equation below first, and then round off the results to the nearest whole digit.
The final 16-bit value are entered into S2 and S3.
The slope equation: S2 = [(maximum destination value –
value) ÷ (maximum source value –maximum source value)] × 1000
The offset equation: S3 = minimum destination value –maximum source value ×
S2 ÷ 1000
The output curve is as shown below: