Handling Of Numeric Values In Floating Point Operations - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
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
, FX
3G
3U
operations.
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:
7
2
S
E7
b31
b30
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).
150
Series
and FX
PLCs, floating point operations are available to achieve higher accuracy in such
3GC
3UC
D 11(b15 to b0)
6
5
1
2
2
2
E6
E5
E1
b29
b28
b24
8 bits in
exponent part
= ± (2
× 2
Example: A22=1 , A21=0, A20=1, A19 to A0=0, E7=1, E6 to E1=0, E0=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 PLC (Octal, Decimal, Hexadecimal and Real Numbers)
0
-1
-2
-3
2
2
2
2
E0
A22
A21
A20
b23
b22
b21
b20
23 bits in
mantissa part
A0 to A22 = 0 or 1
0 in case "b0 to b31 = 0"
−1
−2
0
+ A22 × 2
+ A21 × 2
(E7 × 2 + E6 × 2 + ... + E0 × 2 )
7
6
−1
−2
0
+ 1 × 2
+ 0 × 2
+ 1 × 2
(1 × 2 + 0 × 2 + ... + 1 × 2 )
7
6
0
/2
129
127
= ±1.625 × 2
/2
D 10(b15 to b0)
-21
-22
-23
2
2
2
A2
A1
A0
b2
b1
b0
−23
+ ... + A0 × 2
)
0
127
/2
−3
−23
+ ... + 0 × 2
)
127
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents