Siemens M1 manual Binary and decimal values in S-registers

Models: M1

1 76
Download 76 pages 27.17 Kb
Page 64
Image 64

Technical reference section

Binary and decimal values in S-registers

Although you enter values for S-registers as decimal numbers, like all other values that are stored in PCs they are stored in the registers in binary format:

Bit #

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

Binary

1

1

1

1

1

1

1

1

 

 

 

 

 

 

 

 

 

Decimal

128

64

32

16

8

4

2

1

 

 

 

 

 

 

 

 

 

The value of the register is obtained by adding together the values of all enabled bits. In the example, all bits are enabled ("1") and the result is the number 255. Since all bits can also be disabled ("0"), a total of 256 statuses can be stored in these 8 bit positions. This means that more than one parameter can be stored in one register.

Example:

 

Decimal

Binary

3

00000011

43

00101011

100

01100100

If a command applies only to bits 3, 4 and 5 of an S-registers, up to 8 different statuses can be defined:

Option

Bit 5

Bit 4

Bit 3

Dec.

 

 

 

 

 

0

0

0

0

0

 

 

 

 

 

1

0

0

1

8

 

 

 

 

 

2

0

1

0

16

 

 

 

 

 

3

0

1

1

24

 

 

 

 

 

4

1

0

0

32

 

 

 

 

 

5

1

0

1

40

 

 

 

 

 

6

1

1

0

48

 

 

 

 

 

7

1

1

1

56

 

 

 

 

 

63

Page 64
Image 64
Siemens M1 manual Binary and decimal values in S-registers