Number Representation - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

Introduction to STEP 5
You can compress the internal program memory in the following ways:
With the COMPRESS programmer function
or
With the integral FB238 (COMPR, see Chapter 11).
If a power failure occurs when shifting a block during compressing and the block shift cannot be
completed, the CPU remains in the STOP mode with the error message NINEU. The bits BSTSCH,
SCHTAE and SPABBR are set next to NINEU in the ISTACK.
Remedy: Overall Reset!
7.6

Number Representation

With STEP 5 you can work with numbers in the following representations:
decimal numbers from - 32768 to +32767 (KF)
hexadecimal numbers from 0000 to FFFF (KH)
BCD-coded numbers (4 tetrads) from 0000 to 9999
bit patterns (KM)
constant byte (KY) from 0.0 to 255, 255
The S5-115U represents all numbers internally as 16-bit binary numbers or as bit patterns.
Negative values are represented by their two's complement.
Word No.
Byte No.
Bit No.
Significance
Figure 7-11. Bit Assignment of a 16-Bit Fixed-Point Binary Number
Table 7-6 shows three examples of number representation in the PLC.
Table 7-6. Examples of Number Representation
in the PLC
Entered Value
KF - 50
KH A03F
KY 3,10
7-26
n
(high byte)
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
2
15
2
14
2
13
2
12
2
11
2
10
Representation in the PLC
1111 1111 1100 1110
1010 0000 0011 1111
0000 0011 0000 1010
n
n+ 1 (low byte)
2
9
2
8
2
7
2
6
2
5
2
4
S5-115U Manual
2
3
2
2
2
1
2
0
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents