The invention relates to a method for initializing a communication link between a field device and a control unit according to a communication protocol. Accordingly, the communication link is established after initialization of the communication link and communication between the field device and the control unit takes place according to the communication protocol. The communication protocol defines a broadcasting message with a data area. A broadcasting message generated according to the communication protocol therefore has a data area. At least one datum can be stored in the data area of a broadcasting message.
A field device is a device in the field of automation technology that is directly related to a production process. A field device has, for example, an actuator and/or a sensor. A field device is usually connected to a control system via a fieldbus.
Before communication can take place between the field device and the control unit according to the communication protocol, a communication link must first be initialized. After initialization, the communication link is established, via which communication then takes place according to the communication protocol. In practice, problems often occur during the initialization of the communication link.
The object of the present invention is therefore to provide a method for initializing a communication link between the field device and the control unit according to the communication protocol, in which problems during initialization are at least mitigated. Mitigation also means that problems are less likely to occur.
The object is achieved by the disclosed method. The method according to the invention supplements the method described above in that a broadcasting message is generated and transmitted by the field device according to the communication protocol with a first datum in the data area, and the first datum determines whether or not a communication link is possible.
Furthermore, the broadcasting message is received by the control unit and, if the first datum determines the possibility of the communication link, the communication link is initialized by the control unit.
The first datum is therefore information that indicates whether the communication link with the field device is possible or not. The control unit evaluates the received broadcasting message and thus also the first datum. If the result of the evaluation is that the first datum determines the communication link, i.e. the communication link is possible, then the control unit initializes the communication link. Initialization is usually followed by the establishment of the communication link. If the first datum does not determine the possibility of the communication link and the control unit attempts to initialize the communication link anyway, the field device will refuse to do so.
Although the initialization of the communication link preferably only takes place if it is possible, this is not apparent to a user of the control unit. Therefore, in one design of the method, it is provided that the control unit displays the first datum for a user of the control unit. In particular, the datum is displayed in a format that is understandable for the user, i.e. a human. This allows the user to see whether initialization is possible or not.
In practice, it is often not possible to initialize the communication link immediately. To solve this problem, two alternative designs are presented below.
In the first alternative, the field device determines a duration until the communication link is possible as the first datum. The control unit then initializes the communication link after the duration has elapsed. Accordingly, the duration is the first datum in the data area of the broadcasting message. This duration is understood by the control unit in such a way that the communication link is only initialized by the control unit after this duration has expired. The duration preferably begins when the broadcasting message is received by the control unit.
In the second alternative, the first datum determines the possibility of the communication link. Furthermore, the field device generates a second datum in the data area of the broadcasting message. The second datum determines a duration until the communication link is possible. The control unit then initializes the communication link after the duration has expired. Thus, the data area of the broadcasting message has the first and second datum. Otherwise, the explanations for the first alternative apply.
In the first alternative, the first datum is interpreted by the control unit in such a way that the communication link is possible and that the initialization can be carried out after the duration has expired. The first datum therefore contains two pieces of information. In the second alternative, the first and second datums each have only one piece of information. The first datum contains the information that the communication link is possible and the second datum contains the information that the initialization of the communication link can be completed after the duration has expired.
These two alternatives can be further developed in various ways.
In a further development of the two alternatives, the field device reduces the duration by a waiting time and, after the waiting time, resends the broadcasting message with the reduced duration. The waiting time is a time between two successive transmissions of the broadcasting message. Preferably, the field device resends the broadcasting message several times and reduces the duration by the waiting time each time. In this way, the field device continuously signals the possibility of the communication link and the duration is not unnecessarily long.
In another further development, the control unit displays the duration to the user of the control unit. This informs the user when the initialization of the communication link will take place.
In a further design of the method, the control unit and the field device establish the communication link after the initialization of the communication link and communicate according to the communication protocol.
The case described in the previously described design usually occurs when the communication link is successfully established after initialization. However, it is also possible that the communication link is not successfully established. Therefore, in a further design of the method, if the method has the duration described above, it is provided that an unsuccessful attempt is made to establish the communication link and the field device then increases the duration by an amount. In a further development of this design, the duration is increased by the amount or by another amount for each unsuccessful attempt to establish the communication link in a time interval. The increase in time increases security and a user notices from the increasing duration that there is a problem with the establishment of the communication link.
The communication link can be either wireless or via a medium such as an electrical conductor. In one design of the method, it is provided that the field device and the control unit communicate with each other wirelessly via the communication link in accordance with the communication protocol. This eliminates the medium and the need to connect the field device and the control unit to the medium, which reduces the communication effort.
If the communication link is wireless, then preferably a Bluetooth standard is the communication protocol. The Bluetooth standard is therefore implemented as the communication protocol.
If the communication protocol is a Bluetooth standard, then preferably an advertising message is the broadcasting message. A Bluetooth standard that defines an advertising message is therefore used. According to the Bluetooth standard, advertising messages serve purposes other than the purpose described here in connection with the method.
In a further design, the first datum is stored in a bit of a byte in the data area. Such an advertising message also has a data area. This data area then contains the first and, if applicable, the second datum. Storing the first datum in just one bit is extremely economical in terms of the memory space available in an advertising message.
If the data area has a second datum, then preferably the second datum is also stored in at least one of the remaining bits of the byte. This means that up to 7 bits are available for storage of the duration. If the 7 bits in the byte are not sufficient for storing the duration, a further byte is also used in the data area.
It is known from practice that unauthorized authentication is attempted by the control unit on the field device, for example by an unauthorized user. In one design, the authentication is then rejected by the field device and the communication link between the control unit and the field device is disconnected. Disconnecting the connection improves the security of the field device against tampering.
Authentication is performed, for example, to extend rights on the field device or in connection with the communication link.
Preferably, authentication is performed using a PIN or a password or a fingerprint.
In a further design, the control unit is a smartphone. The functionality of the control unit is implemented on the smartphone using an application.
In a further design, the field device is a flowmeter, a level measuring device, a level switch, a temperature measuring device or a pressure measuring device. If the field device is a flowmeter, then it is preferably a magnetic-inductive flowmeter, a Coriolis mass flowmeter or an ultrasonic flowmeter. If the field device is a level measuring device, then it is preferably a radar level measuring device or an ultrasonic level measuring device. If the field device is a level switch, then it is preferably a vibrating level switch or a capacitive level switch.
In detail, there are a number of possibilities for designing and further developing the method for communication between the field device and the control unit according to the communication protocol. Reference is made to the following description of a preferred embodiment in conjunction with the drawings.
In the following, the field device 1 and the control unit 2 are in operation and perform the following method.
In a first method step 101, a broadcasting message 6 is generated and transmitted by the field device 1 according to the communication protocol with a first datum 8 and a second datum 9 in the data area 7 of the broadcasting message 6. The first datum 8 determines whether a communication link between the field device 1 and the control unit 2 is possible or not. The second datum 9 determines a duration until the communication link is possible. Here, the communication link is possible and the duration is 10 s. In the present embodiment, the data area 7 has two bytes, i.e. a first byte 10 and a second byte 11 for storing information. The data area of a broadcasting message can also have more than two bytes. The first datum 8 and the second datum 9 are arranged by the field device 1 in the first byte 10 in the data area 7. Specifically, the first datum 8 is stored in the lowest value bit and the second datum is stored in the seven remaining bits of the first byte 10.
In a second method step 102, the control unit 2 receives and evaluates the broadcasting message 6. Then, if the evaluation determines that the first datum 8 determines the possibility of the communication link, the control unit 2 initializes the communication link after the duration has elapsed and the control unit 2 and the field device 1 establish the communication link and then communicate according to the communication protocol. In the present embodiment, the evaluation shows that the communication link is possible, namely after a duration of 10 s after receiving the broadcasting message 6. Before the duration expires, the initialization of the communication link is denied by the field device 1.
Accordingly, in a third method step 103 the communication link is initialized by the control unit 2, in a fourth method step 104 the communication link is established by the control unit 2 and the field device 1 and in a fifth method step 105 communication takes place via the established communication link according to the communication protocol.
The possibility of the communication link, i.e. the first datum, and the duration, i.e. the second datum, are also displayed by the control unit 2 on the display 3 in a way that is understandable for a user in the second method step 102.
The field device 1 and the control unit 2 communicate with each other wirelessly, i.e. in particular using the antennas 5, via the communication link according to the communication protocol. Any information is exchanged via the communication link. For example, in a sixth method step 106, a measurement of the field device 1 is started by the control unit 2 via the communication link, which is known to be a magnetic-inductive flowmeter in this embodiment. Furthermore, in a seventh method step 107, a measured value of the measurement is transmitted from the field device 1 to the control unit 2 via the communication link and displayed on the display 3 in a way that is understandable for the user.
In another example, in the sixth method step 106, a configuration of the field device 1 is changed or a status of the field device 1 is monitored by the control unit 2 via the communication link. The seventh method step 107 is omitted in this example.
The communication protocol is a Bluetooth standard, specifically one that defines an advertising message. In this embodiment, the advertising message is used as a broadcasting message.
In the further course of operation, in an eighth method step 108, the user attempts to authenticate the control unit 2 on the field device 1 by entering a password into the keypad 4 on the control unit 2. The authentication would result in the extension of the user's rights on the field device 2. However, since the password is not correct, the authentication is rejected by the field device 1 in a ninth method step 109 and the communication link between the control unit 2 and the field device 1 is disconnected.
Number | Date | Country | Kind |
---|---|---|---|
10 2023 100 650.9 | Jan 2023 | DE | national |