Converting Real To Dint - 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.31

Converting REAL to DINT

REAL_TO_DINT
This function converts a value from REAL data type to DINT data type.
Structured text
d:=REAL_TO_DINT(s);
Setting data
■Description, type, data type
Argument
s (IN)
d
Processing details
■Operation processing
• This function converts the value input to (s) from REAL data type to DINT data type, and output the converted value from
(d).
(s)
16543521.0
REAL
• Input a REAL data type value to (s) within the range of -2147483648 to 2147483647.
• After conversion, the first digit after the decimal point of the input value (REAL data type) is rounded off.
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
Error code
Description
3401H
The single-precision real number input to (s) is out of the range, -2147483648 to 2147483647.
3402H
• An unusual number is input to (s).
• The single-precision real number input to (s) is not within the following range:
128
-2
(E-3.40282347+38 to E-1.17549435-38, 0, E1.17549435-38 to E3.40282347+38)
• The value set to a device or label is -0, a subnormal number, NaN (not a number), or ±∞.
12 TYPE CONVERSION FUNCTIONS
156
12.31 Converting REAL to DINT
Description
Input
Output
-126
-126
128
<(s)≤-2
, 0, 2
≤(s)<2
(d)
16543521
DINT
Type
Data type
Input variable
REAL
Output variable
DINT

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents