FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
5.1.3
Handling of numeric values in floating point operations
Handling of numeric values in floating point operations
Binary integers are handled inside PLCs.
During division of integers, the answer "40 ÷ 3 = 13 ... 1" is obtained, for example.
During square root extraction operations, decimal points are ignored.
In FX
, FX
and FX
3G
3U
Binary floating point (real number)
When handling a binary floating point (real number) in data registers, use a pair of data registers having consecutive
device numbers.
When D11 and D10 are used, for example, a binary floating point is handled as shown below:
2
7
2
S
E7
E6
b31
b30
b29
E0 to E7 = 0 or 1
Sign for mantissa part
(0: Positive, 1: Negative)
Binary floating point (real number)
Binary floating point (real number)
The sign bit b31 states whether data is positive or negative, but is not handled as a complement.
Number of significant figures
The number of significant figures of binary floating point is approximately 7 when expressed in decimal. The binary
floating point range is as follows:
- Least absolute value: 1175494 × 10
- Most absolute value: 3402823 × 10
Handling of the zero (M8020), borrow (M8021) and carry (M8022) flags
These flags operate as follows in floating point operations.
- Zero flag
- Borrow flag
- Carry flag
Monitoring of binary floating point (real number)
A programming software supporting the display of floating point such as GX Developer can directly monitor binary
floating point (real number).
A programming tool not supporting the display of floating point can monitor binary floating point (real number) when it
is converted into scientific notation (real number).
PLCs, floating point operations are available to achieve higher accuracy in such operations.
3UC
D 11(b15 to b0)
6
2
5
2
1
2
0
E5
E1
E0
b28
b24
b23
8 bits in
exponent part
0
= ± (2
(E7 × 2 + E6 × 2 + ... + E0 × 2 )
× 2
Example: A22=1 , A21=0, A20=1, A19 to A0=0, E7=1, E6 to E1=0, E0=1
0
= ± (2
(1 × 2 + 0 × 2 + ... + 1 × 2 )
× 2
= ±1.625 × 2
-44
32
: 1 when the result is 0
: 1 when the result does not reach the minimum unit but is not 0
: 1 when the absolute value of the result exceeds the available numeric value range.
5 How to Specify Devices and Constants to Instructions
5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers)
D 10(b15 to b0)
2
-1
2
-2
2
-3
A22
A21
A20
b22
b21
b20
23 bits in
mantissa part
A0 to A22 = 0 or 1
0 in case "b0 to b31 = 0"
−1
−2
+ A22 × 2
+ A21 × 2
+ ... + A0 × 2
7
6
0
127
/2
−1
−2
−3
+ 1 × 2
+ 0 × 2
+ 1 × 2
+ ... + 0 × 2
7
6
0
127
/2
129
127
2
= ±1.625 × 2
/2
2
-21
2
-22
2
-23
A2
A1
A0
b2
b1
b0
−23
)
−23
)
1
2
3
4
5
6
7
8
9
10
153