Using Real Number Data - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

3.2.4

Using real number data

Real number data is floating decimal point data used with basic instructions and application instructions.
Only word devices are capable of storing real number data.
(1) Single-precision floating-point data
Instructions which deal with single-precision floating-point data designate devices which are used for the lower 16 bits of
data.
Single-precision floating-point data are stored in the 32 bits which make up (designated device number) and (designated
device number + 1).
M0
EMOV R100
Remark
In sequence programs, floating decimal point data are designated by E
Single-precision floating-point data uses two word devices and is expressed in the following manner:
[Sign] 1. [Mantissa part] 2
The bit configuration and meaning of the internal representation of single-precision floating-point data is as
follows:
b31
b30
b31
b23 to b30
Sign
Exponent part
• Sign The sign is represented at b31.
0: Positive
1: Negative
• Exponent part The n of 2n is represented from b23 to b30.
Depending on the BIN value of b23 to b30, the value of n is as follows:
b23 to b30
n
• Variable part The 23 bits from b0 to b22, represents the XXXXXX... at binary 1.XXXXXX....
(2) Double-precision floating-point data
Instructions which deal with double-precision floating-point datadesignate devices which are used for the lower 16 bits of
data.
Double-precision floating-point data are stored in the 64 bits which make up (designated device number) to (designated
device number + 3).
M0
EDMOV R100
88
D0
Designation of 2 points of word devices D0 and D1
(32 bits)
Designation of 2 points of R100 and R101 (32 bits)
Single-precision floating-point data transfer instruction
[Exponent part]
to
b23
b22
to
FF
FE
FD
H
H
H
Not used 127
126
D0
b16
b15
b0 to b22
Mantissa part
81
80
7F
7E
H
H
2
1
0
-1
Designation of 4 points of word devices D0, D1, D2
and D3 (64 bits)
Designation of 4 points of R100, R101, R102 and
R103 (64 bits)
Double-precision floating-point data transfer
instruction
.
to
b0
02
01
00
-125 -126 Not used

Advertisement

Table of Contents
loading

Table of Contents