EasyManua.ls Logo

Siemens CPU 948 - Page 137

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
This conversion algorithm produces the following result classes:
Floating point numbers 0 or -1 result in the next lower
number.
Floating point numbers < 0 and > -1 result in the value ’0’.
Conversion examples
Examples of CFW, CSW
Floating point number 32-bit fixed point number
GFD
+5,7 5
-2,3
-3
-0,6 0
+0,9
0
1. You want the contents of data word DW 64
inverted bit for bit (reversed) and stored in
data word DW 78.
STEP 5 program: Assignment of the data words:
:L DW 64 KM = 0011111001011011
:CFW
:T DW 78 KM = 1100000110100100
2. The contents of data word DW 207 are
interpreted as a fixed point number and stored
in data word 51 with a reversed sign.
STEP 5 program: Assignment of the data words:
:L DW 207 KF = +51
:CSW
:T DW 51 KF = -51
Executive Operations
CPU 948 Programming Guide
C79000-G8576-C848-04
3 - 65

Table of Contents

Related product manuals