Programming instructions
6.1 Basic instructions
ENO status
1
0
Ceiling and Floor instructions
Parameter
IN
OUT
ENO status
1
0
6.1.7.1
Scale and normalize instructions
Scale and normalize instructions
Click below the box name and select a data type from the drop-down menu.
124
Description
No error
IN is +/- INF or +/- NaN
CEIL converts a real number to the smallest integer greater than or equal
to that real number (IEEE - round to +infinity).
FLOOR converts a real number to the greatest integer smaller than or
equal to that real number (IEEE - round to -infinity).
Data type
Real, LReal
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Description
No error
IN is +/- INF or +/- NaN
SCALE_X 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
For SCALE_X, parameters MIN, MAX, and OUT must be the same data type.
NORM_X 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 )
For NORM_X, parameters MIN, VALUE, and MAX must be the same data
type.
Result OUT
Valid result
+/- INF or +/- NaN
Description
Floating point input
Converted output
Result OUT
Valid result
+/- INF or +/- NaN
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
Need help?
Do you have a question about the SIMATIC S7 and is the answer not in the manual?