7.7.5
SCALE_X (Scale) and NORM_X (Normalize) instructions
Table 7- 89
SCALE_X and NORM_X instructions
LAD / FBD
SCL
out :=SCALE_X(min:=_in_,
out :=NORM_X(min:=_in_,
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
1
Table 7- 90
Data types for the parameters
Parameter
Data type
MIN
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
VALUE
SCALE_X: Real, LReal
NORM_X: SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
MAX
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
OUT
SCALE_X: SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
NORM_X: Real, LReal
For SCALE_X: Parameters MIN, MAX, and OUT must be the same data type.
1
For NORM_X: Parameters MIN, VALUE, and MAX must be the same data type.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
value:=_in_,
max:=_in_);
value:=_in_,
max:=_in_);
1
7.7 Conversion operations
Description
Scales the normalized real parameter VALUE
where ( 0.0 <= VALUE <= 1.0 ) in the data type
and value range specified by the MIN and MAX
parameters:
OUT = VALUE (MAX - MIN) + MIN
Normalizes the parameter VALUE inside the
value range specified by the MIN and MAX
parameters:
OUT = (VALUE - MIN) / (MAX - MIN),
where ( 0.0 <= OUT <= 1.0 )
Description
Input minimum value for range
Input value to scale or normalize
Input maximum value for range
Scaled or normalized output value
Basic instructions
251