Converting Real To Lreal - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Motion module instructions, standard functions/ function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

12.32

Converting REAL to LREAL

REAL_TO_LREAL
This function converts a value from REAL data type to LREAL data type.
Structured text
d:=REAL_TO_LREAL(s);
Setting data
■Description, type, data type
Argument
Description
s (IN)
Input
d
Output
Processing details
■Operation processing
• This function converts the value input to (s) from REAL data type to LREAL data type, and output the converted value from
(d).
(s)
1234.0
REAL
• Input a REAL 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
Error code
Description
3402H
The data input to (s) is -0 or out of the following range.
128
-126
-2
<(s)≤-2
(E-3.40282347+38 to E-1.17549435-38, 0, E1.17549435-38 to E3.40282347+38)
3403H
The data output from (d) exceeds the following range. (An overflow has occurred.)
128
|(d)|<2
(d)
1234.0
LREAL
-126
128
, 0, 2
≤(s)<2
Type
Data type
Input variable
REAL
Output variable
LREAL
12 TYPE CONVERSION FUNCTIONS
12.32 Converting REAL to LREAL
12
157

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents