Number Representation - Siemens SIMATIC S5-90U System Manual

Table of Contents

Advertisement

Introduction to STEP 5
You can use the COMPRESS programmer function to clean up program memory.
If there is a power failure during the compress operation when a block is being shifted and block
shifting can not be completed, the programmable controller remains in the STOP mode. The
"NINEU" error message appears and the "NINEU" bit is set in the ISTACK. Additionally, the
"BSTSCH" and the "SCHTAE" bits are set.
Remedy: Overall reset.
7.5

Number Representation

With STEP 5 you can work with numbers in the following five 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 (two-byte representation) from 0 to 255 for each byte (KY)
Number Formats
The programmable controller is designed to process binary signal states ("0" and "1"). Therefore
programmable controllers represent all numbers internally as 16-bit binary numbers or as bit
patterns.
Four bits can be combined into a tetrad (BCD) to shorten the binary code representation. The value
of these tetrads can be displayed in hexadecimal representation.
Example:
16-bit binary coded number and shortened hexadecimal representation
Word no.
Byte no.
Bit no.
Binary code represent.
Meaning
Hexadecimal representation
Figure 7-9. Bit Assignment of a 16-Bit Fixed-Point Binary Number
7-18
n
(high byte)
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
0
0
0
1
1
1
15
14
13
12
11
10
2
2
2
2
2
2
1
n
n+ 1 (low byte)
1
1
0
1
1
0
9
8
7
6
5
2
2
2
2
2
2
F
6
EWA 4NEB 812 6115-02b
S5-90U/S5-95U
0
0
1
1
4
3
2
1
0
2
2
2
2
3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents