2-419
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
DispartReal
The following example is for when In is REAL data with a value of REAL#−123.456.
The following example is for when In is LREAL data with a value of LREAL#−123.456789.
The following table shows the valid ranges for Fraction according to the data types In and Fraction.
Use the UniteReal instruction (page 2-421) to combine a signed mantissa and exponent to form a real
number.
• Depending on the value of In, error may occur in the conversion to an integer.
Data type of In Data type of Fraction Valid range of Fraction
REAL DINT −9999999 to 9999999
LREAL LINT −999999999999999 to 999999999999999
Additional Information
Precautions for Correct Use
DispartReal(REAL#−123.456, abc, def);
LD ST
abc
def
REAL#−123.456
DispartReal
EN ENO
In
Fraction
Exponent
Fraction = abc
Exponent = def
In
Exponent
Signed mantissa
−1234560
−4
REAL#−123.456
DispartReal(LREAL#−123.456789, abc, def);
LD
ST
abc
def
LREAL#−123.456789
DispartReal
EN ENO
In
Fraction
Exponent
−123456789000000
Fraction = abc
−12
Exponent = def
LREAL#−123.456789
In
Signed mantissa
Exponent