100BBasic instructions
7.7 Convert
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
205
Table 7- 84 Data types for the parameters
Parameter
Data type
Description
IN
Real, LReal
Floating point input
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Rounded or truncated output
Table 7- 85 ENO status
ENO
Description
Result OUT
1
No error
Valid result
0
IN is +/- INF or +/- NaN
+/- INF or +/- NaN
7.7.4
Ceiling and floor instructions
Table 7- 86 CEIL and FLOOR instructions
LAD / FBD
SCL
Description
out := CEIL(in);
Converts a real number (Real or LReal) to the closest integer
greater than or equal to the selected real number (IEEE "round
to +infinity").
out := FLOOR(in);
Converts a real number (Real or LReal) to the closest integer
smaller than or equal to the selected real number (IEEE "round
to -infinity").
1
For LAD and FBD: Click the "???" (by the instruction name) and select a data type from the drop-down menu.
Table 7- 87 Data types for the parameters
Parameter
Data type
Description
IN
Real, LReal
Floating point input
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal
Converted output
Table 7- 88 ENO status
ENO
Description
Result OUT
1
No error
Valid result
0
IN is +/- INF or +/- NaN
+/- INF or +/- NaN