Technical data

Coding floating point numbers
Coding a floating point number:
31 30 24 23 22 0
V2
6
... . ... 2
0
V2
-1
.... . . . . . ... 2
-23
Exponent Mantissa
Specification of the data format for floating point numbers at the
PG: KG
Permissible numerical range
± 0.1469368 x 10
-38
to ± 0.1701412 x 10
39
Input/output on PG
a) in a logic block:
You want to load the number N = 12.34567 as a floating point
number.
Input:
:LKG1234567+2
b) in a data block:
You want to define the number N = - 0.005 as a floating point
constant.
Input:
6: KG = - 5 - 2
PG display after you enter the line:
6: KG =- 5000000 - 02
Mantissa with sign Exponent (base 10)
with sign
Value of the number input: - 0.5 x 10
-2
= 0.005
PG display after you enter the line:
:L KG + 1234567 + 02
Mantissa with sign Exponent (base 10)
with sign
Value of the number input: +0.1234567 x 10
+2
= 12.34567
2
STEP 5 Programming Language
CPU 928B Programming Guide
C79000-B8576-C898-01
2 - 11