Reading Single Bits From Modbus Registers - Bosch Buderus Logamatic 5000 Series Manualline

Table of Contents

Advertisement

User Documentation
Bit Number
Valence
Bit to be set
Calculated integer or bit pattern:
If, on the other hand, you would like to set several bits (e.g. temperature-controlled
[Bit2], priority [Bit1] and guide tank [Bit0]), the table and corresponding calculation
would look like this:
Bit Number
Valence
Bit to be set
Calculated Integer or Bit Pattern:
�������������� = �������������� ������
������ �������������� = 0000000000000111

6.2 Reading single bits from Modbus registers

If you want to read individual bits from a Modbus register, e.g. to read out the cur-
rent errors on the safety chain, proceed as follows:
First, read out the register contents as an integer. The read integer must then be
transferred to a bit pattern. To transfer the integer to a bit pattern, please proceed as
follows:
Now divide the read integer by the valence, starting with the highest bit (division with
remainder). If the quotient is equal to zero, you can divide the integer with the signifi-
cance of the next smaller bit. As soon as the quotient is not equal to zero, the cur-
rent bit is set and you can use the remainder of the divisi-on as a dividend for the
calculation with the significance of the next smaller bit. You apply this scheme until
you have divided the integer or the remainder by all bits. The result is the corre-
sponding bit pattern.
For this you can use the following formula (division with remainder):
© All rights with Robert Bosch GmbH, also for the case of protected rights applications
EN_User_documentation_Instructions_for_controlling_the_Logamatic_5000_controller_series_via_Modbus_TCP_I
P_20210203.docx | 10.02.2021
Bit
Bit
Bit
7
6
5
128
64
32
�������������� = �������������� ������
������ �������������� = 0000000000000100
Bit
Bit
Bit
7
6
5
128
64
32
+ �������������� ������
+ �������������� ������
2
1
��
�������������� ���� ������������������
������
=
��������������
�������������� ������
Bit
Bit
Bit
4
3
2
16
8
4
X
= 4
2
��
Bit
Bit
Bit
4
3
2
16
8
4
X
= 4 + 2 + 1 = 7
0
��������������
27|33
Bit
Bit
1
0
2
1
Bit
Bit
1
0
2
1
X
X

Advertisement

Table of Contents
loading

This manual is also suitable for:

Buderus control 8000 series

Table of Contents