Siemens CPU 948 Programming Manual page 40

Simatic s5 s5-155u
Table of Contents

Advertisement

STEP 5 Programming Language
Using floating point numbers
Accuracy
Coding floating point numbers Coding a floating point number:
Permissible numerical range
Input/output on PG
2 - 10
Use floating point numbers for solving extensive calculations,
especially for multiplication and division or when you are working
with very large or very small numbers!
The mantissa indicates the accuracy of the floating point number as
follows:
• • Accuracy with a 24-bit mantissa:
-24
2
= 0.000000059604 (corresponds to 7 decimal places)
If the sign of the mantissa is "0" the number is positive; if the sign is
"1" it is a negative number in its two's complement representation.
The floating point value '0' is represented as the binary value
80000000H (32 bits, see below).
31 30
24 23 22
6
0
V
2
...
. ... 2
Exponent
Specification of the data format for floating point numbers at the
PG:
KG
± 0.1469368 x 10
-38
to ± 0.1701412 x 10
a)
in a logic block:
You want to load the number N = 12.34567 as a floating point
number.
Input:
:LKG1234567+2
-1
V
2
.... . . .
Mantissa
39
CPU 948 Programming Guide
C79000-G8576-C848-04
0
-23
. . ... 2

Advertisement

Table of Contents
loading

Table of Contents