Mitsubishi Electric MELSEC-Q Structured Programming Manual page 128

Hide thumbs Also See for MELSEC-Q:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
[Device & Common]
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
b29
E0 to E7 = 0 or 1
Sign for mantissa part
(0: Positive, 1: Negative)
Binary floating point (real number)= ±(2
Binary floating point (real number)= ±(2
The sign bit b31 indicates 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 the decimal
notation.
Binary floating point handles the following range:
- Minimum absolute value 1175494 × 10
- Maximum absolute value 3402823 × 10
Handling of zero (M8020), borrow (M8021) and carry (M8022) flags
These flags operate as follows in floating point operations:
- Zero flag
- Borrow flag : "1" when the result does not reach the minimum unit but is not "0"
- Carry flag
Monitoring of binary floating point (real number)
Programming software such as GX Works2 which supports the display of floating point can directly monitor
binary floating point (real number).
126
D 11(b15 to b0)
6
5
1
2
2
2
E6
E5
E1
b28
b24
b23
8 bits in exponent part
0
(E7×2
×2
Example: A22=1, A21=0, A20=1, A19 to A0=0, E7=1, E6 to E1=0, E0=1
0
(1×2
×2
=±1.625×2
: "1" when the result is truly "0"
: "1" when the absolute value of the result exceeds the available value
3 How to Specify Devices and Constants in Instructions
3.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers)
0
1
-2
-3
-
2
2
2
2
E0
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
+E6×2
+•••+E0×2
)
127
/2
-1
-2
-3
+1×2
+0×2
+1×2
+•••+0×2
7
6
0
+0×2
+•••+1×2
)
127
/2
129
127
/2
=±1.625×2
-44
32
D 10(b15 to b0)
-21
-22
-23
2
2
2
A2
A1
A0
b2
b1
b0
-23
)
-23
)
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-lMelsec-fFx3sFx3gFx3gcFx3u ... Show all

Table of Contents