Basic instructions
7.7 Conversion operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
251
SCALE_X (Scale) and NORM_X (Normalize) instructions
Table 7- 89 SCALE_X and NORM_X instructions
value:=_in_,
max:=_in_);
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
value:=_in_,
max:=_in_);
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 )
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
Table 7- 90 Data types for the parameters
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Input minimum value for range
VALUE SCALE_X: Real, LReal
NORM_X: SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Input value to scale or normalize
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Input maximum value for range
OUT SCALE_X: SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Scaled or normalized output value
For SCALE_X: Parameters MIN, MAX, and OUT must be the same data type.
For NORM_X: Parameters MIN, VALUE, and MAX must be the same data type.