5.1 Type Conversion Functions
5.1.16 Double-precision real type
→
word (signed), double word (signed) type conversion
5-49
5
APPLICATION
FUNCTIONS
LREAL_TO_INT(_E),
LREAL_TO_DINT(_E)
LREAL_TO_INT(_E), LREAL_TO_DINT(_E)
(2) LREAL_TO_DINT, LREAL_TO_DINT_E
(a) Converts double-precision real type data input to into double word (signed) type
data, and outputs the operation result from .
(b) The value to be input to is double-precision real type data within the range from
−2147483648 to 2147483647.
(c) The converted data is the value rounded double-precision real type data to the first digit
after the decimal point.
Operation result
(1) Function without EN/ENO
The following table shows the operation results.
(2) Function with EN/ENO
The following table shows the executing conditions and operation results.
*1 When FALSE is output from ENO, the data output from is undefined.
In this case, create a program so that the data output from is not used.
Operation result
No operation error Operation output value
Operation error Undefined value
EN ENO
TRUE (Operation execution)
TRUE (No operation error) Operation output value
FALSE (Operation error)
*1
Undefined value
FALSE (Operation stop)
FALSE
*1
Undefined value
s
d
Double-precision real type
16543521.0
Double word (signed) type
16543521
s
d
d
d
d