LREAL is supported for 32-bit PLCs, e.g. FP7 only. Thus, programs using the data type LREAL cannot run on 16-bit PLC types.
Integer literals like '123' are implicitly converted to LREAL.
LREAL offers a higher precision of approx. 16 digits and a larger range of values in comparison to data type REAL.
Variables of the data type LREAL are real 64 bit numbers based on IEEE754. The mantissa is 52 bits and the exponent is 11 bits.
Range for LREAL values: |
-1.7976931348623158e+308 to -2.2250738585072014e-308 |
0.0 |
|
+2.2250738585072014e-308 to +1.7976931348623158e+308 |
|
The default for the initial value, e.g. for the variable declaration in the POU header or in the global variable list: |
0.0 |
You can enter LREAL values in the following format: [+-] Integer.Integer [(Ee) [+-] Integer]
5.983e-137
-33.876e122
3.8762204557123e3
0.000123
123.0