12.27
Converting DINT to REAL
DINT_TO_REAL
This function converts a value from DINT data type to REAL data type.
Structured text
d:=DINT_TO_REAL(s);
Setting data
■Description, type, data type
Argument
s (IN)
d
Processing details
■Operation processing
• This function converts the value input to (s) from DINT data type to REAL data type, and output the converted value from
(d).
(s)
16543521
DINT
• Input a DINT data type value to (s).
• The number of significant digits is about seven because a REAL data type value is processed in 32-bit single precision.
• If the integer value exceeds the range of -16777216 to 16777215, a rounding error occurs in the converted value.
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
There is no operation error.
12 TYPE CONVERSION FUNCTIONS
152
12.27 Converting DINT to REAL
Description
Input
Output
16543521.0
REAL
(d)
Type
Data type
Input variable
DINT
Output variable
REAL