Download Print this page

Real Number Data (Floating-Point Data) - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Real number data (floating-point data)

Data size and data range
Real number data includes single-precision 32-bit real number data.
Real number data can be stored only in devices other than bit devices or in single-precision real data type labels.
Data name
Single-precision real number data (single-precision
floating-point data)
Configuration of single-precision real number data
Single-precision real number data consists of a sign, mantissa, and exponent, and is expressed as shown below.
1.
Sign
Mantissa
The following figure shows the bit configuration of the internal expression of single-precision real number data and the
meaning of each part.
b31
b30
∙∙∙
Sign
Exponent
■Sign (1 bit)
This bit represents the positive or negative sign of a numerical value. "0" indicates a positive number or 0. "1" Indicates a
negative number.
■Mantissa (23 bits)
A mantissa means XXXXX of 1.XXXXX2
■Exponent (8 bits)
An exponent means N of 1.XXXXX2
relationships between the exponent value and N of a single-precision real number.
Exponent (b24 to b30)
N
Precautions
■When setting an input value of single-precision real number from the engineering tool
The number of significant digits is about 7 because the engineering tool processes single precision real number data in 32-bit
single precision.
When the input value of single-precision real number data exceeds 7 digits, the 8th digit is rounded off.
Therefore, if the rounded-off value goes out of the range from -2147483648 to 2147483647, it will not be an intended value.
Ex.
When "2147483647" is set as an input value, it is handled as "2147484000" because 8th digit "6" is rounded off.
Ex.
When "E1.1754943562" is set as an input value, it is handled as "E1.175494" because 8th digit "3" is rounded off.
1 OVERVIEW
34
1.2 Data Specification Method
Positive
number
Zero
Negative
number
Exponent
× 2
b23
b22
∙∙∙
b16
N
representing a single-precision real number in binary.
N
representing a single-precision real number in binary. The following table shows the
FFH
FEH
FDH
Not used
127
126
Data size
32 bits (2 word)
b15
∙∙∙
Mantissa

81H
80H

2
1
Value range
-126
128
 real number<2
2
0
128
-126
-2
<real number-2
b0

7FH
7EH
02H

0
-1
-125
01H
00H
-126
Not used

Hide quick links:

Advertisement

loading