89
2
3
4
5
6
7
8
3.2
D
esignating Dat
a
3.2.4
U
sing r
eal nu
mber data
Remark
In sequence programs, floating decimal point data are designated by E
.
Double-precision floating-point data uses four word devices and is expressed in the following manner:
[Sign] 1. [Mantissa part] 2
[Exponent part]
The bit configuration and meaning of the internal representation of double-precision floating-point data is as
follows:
• Sign The sign is represented at b63.
0: Positive
1: Negative
• Exponent part The n of 2n is represented from b52 to b62.
Depending on the BIN value of b52 to b62, the value of n is as follows:
• Variable part The 52 bits from b0 to b51, represents the XXXXXX... at binary 1.XXXXXX....
1. The CPU module floating decimal point data can be monitored using the monitoring function of a peripheral device.
2. When floating-point data is used to express 0, all data in the following range are turned to 0.
(a)
Single-precision floating-point data: b0 to b31
(b)
Double-precision floating-point data: b0 to b63
3. The setting range of floating decimal point data is as follows. *
1
(a)
Single-precision floating-point data
-2
128
< Device data
-2
-126
, 0, 2
-126
Device data < 2
128
(b)
Double-precision floating-point data
-2
1024
< Device data
-2
-1022
,0,2
-1022
Device data < 2
1024
4. Do not specify -0 in floating-point data (only when the most significant bit of the floating-point real number is 1). (An
operation error will occur if floating-point operation is performed with -0.)
When -0 is specified, the following CPU module internally converts the value to 0 to perform a floating-point operation.
Therefore an operation error does not occur.
• The High Performance model QCPU with the internal processing set to "double precision". *
2
(Double
precision is set by default for the floating-point operation processing.)
When -0 is specified, the following CPU module performs a floating-point operation with -0, keeping its processing speed.
Therefore an operation error occurs.
• Basic model QCPU *
3
• High Performance model QCPU where internal operation is set to single precision *
2
• Process CPU
• Redundant CPU
• Universal model QCPU
• LCPU
*1:
For operations when a real number is out of range and operations when an invalid value is input, refer to the QnUCPU User's
Manual (Function Explanation, Program Fundamentals) or Qn(H)/QnPH/QnPRHCPU User's Manual (Function Explanation,
Program Fundamentals).
*2:
Switch between single precision and double precision of the internal operation of floating-point operation in the PLC system of
the PLC parameter dialog box. For the single precision and double precision of floating-point operation, refer to the QnUCPU
User's Manual (Function Explanation, Program Fundamentals) or Qn(H)/QnPH/QnPRHCPU User's Manual (Function
Explanation, Program Fundamentals).
*3:
The Basic model QCPU can perform floating-point operation if its first five digits of serial No. are "04122 or later".
b6
3
b6
2
t
o
b5
2
b5
1
b
1
6
t
o
b
1
5
b
0
t
o
b6
3
S
i
g
n
b5
2
t
o
b6
2
Exp
o
nent part
b
0
t
o
5
1
M
antissa part
b5
2
t
o
b6
2
7FF
H
7FE
H
7F
D
H
4
00
H
3
FF
H
3
FE
H
3
F
C
H
02
H
01
H
00
H
n
N
o
t use
d 1023 1022
2
1
0
3
F
D
H
1
2
1021
1022
N
o
t use
d