MODBUS host monitoring

By receiving Modbus client requests in the control device and storing its IP address and number of requests, the processing unit automatically detects the Modbus host and switches the fallback mode, the complexity of the Modbus server's output fallback monitoring of the client output in the Modbus protocol is solved. , realizes automatic detection and management, and improves configuration flexibility and management efficiency.

CN119030896AInactive Publication Date: 2024-11-26SCHNEIDER ELECTRIC IND SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410627758.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-23
Filing Date
2024-05-21
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The Modbus protocol lacks a mechanism for effectively monitoring the output fallback of the Modbus client for Modbus server, resulting in complex and inflexible configuration, and requires frequent reconfiguration when the host address changes.

Method used

Provides a control device that receives requests from Modbus clients through a network interface, stores its IP address and number of requests, uses processing units to automatically detect the Modbus host, switches backing mode according to request frequency and number of requests, manages output, and generates a table to monitor. and manage output fallback.

Benefits of technology

It realizes automatic detection and output fallback management of Modbus hosts, simplifies lost host detection and output coverage in multi-host mode, and improves configuration flexibility and management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030896A_ABST
    Figure CN119030896A_ABST
Patent Text Reader

Abstract

A control device (CD) manages the outputs of a set of input / output modules and implements a Modbus server communicating with a Modbus client according to a Modbus TCP / IP communication protocol, comprising a network interface (NI) configured to receive a request from the Modbus client to command one or more outputs, a storage unit (SU) configured to store the one or more outputs from the Modbus client, the system includes a Modbus client configured to store an IP address of the Modbus client for each request received from the Modbus client and a number of requests received from the Modbus client, a processing unit (PU) configured to receive a request from the Modbus client when a frequency of commands received from the Modbus client to the one or more output requests is above a threshold value, and a processor configured to transmit the request to the Modbus client when the frequency of commands received from the Modbus client to the one or more output requests is above the threshold value. A Modbus client is determined as a Modbus host for the one or more outputs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates generally to industrial automation systems and, more particularly, to a control device implementing a Modbus server and communicating with a controller implementing a Modbus client that can act as a Modbus master according to the TCP Modbus protocol. Background Art

[0002] The term IP (Internet Protocol) network will be used below to refer to an internet (intranet or extranet) type communication network based on the TCP / IP (Transport Protocol / Internet Protocol) standard. Modbus is a messaging protocol commonly used in automation device architectures (http: / / www.modbus.org / ). IP networks can transmit messages based on the Modbus / TCP communication protocol. Modbus / TCP is a communication protocol that exchanges frames based on the Modbus protocol at the application layer (layer 7) of the ISO (International Organization for Standardization) model and transmits these Modbus frames over Ethernet using the ISO layer of the TCP / IP standard for internetwork.

[0003] In the remainder of this document, the term "Modbus network" defines a Modbus link using a communication protocol that enables the exchange of frames according to the Modbus protocol and the transmission of these Modbus frames over a multipoint link.

[0004] Currently, the Modbus protocol does not describe any procedure for a Modbus server to effectively monitor a Modbus client acting as a Modbus master to implement output fallback.

[0005] A control device that manages the outputs of a group of input / output modules, a fallback mechanism for these outputs, and implements a Modbus server acting as a Modbus slave needs to monitor the Modbus client acting as a Modbus master to position the outputs in fallback if communication stops after a configurable time. To overcome this problem, the application can provide a configuration screen that allows the host address (IP) to be stored and allows the maximum time to determine that the host has disappeared. A reservation time can be configured to guarantee the host that no other host can occupy the island reservation during this period.

[0006] The disadvantage of this configuration is that all information must be configured, and if the host's address changes, all previous information must be reconfigured. If configuration is not centralized, a dedicated application must be used for each affected control device. If configuration is centralized, the configuration screen must be retrieved for each affected control device. In each case, the configuration must be set up and ensured to function correctly.

[0007] Therefore, a control device is needed to support effective monitoring of the host to implement output fallback. Summary of the Invention

[0008] This summary is provided to introduce concepts related to the claimed subject matter. This summary is not intended to identify essential features of the claimed subject matter, nor is it intended to be used to determine or limit the scope of the claimed subject matter.

[0009] In one embodiment, a control device is provided for managing the outputs of a group of input / output modules and implementing a Modbus server that communicates with a Modbus client according to the Modbus TCP / IP communication protocol, comprising:

[0010] A network interface configured to receive a request from a Modbus client to command one or more outputs,

[0011] a storage unit configured to store, for each request received from the Modbus client, an IP address of the Modbus client and a number of requests received from the Modbus client,

[0012] The processing unit is configured to determine that the Modbus client serves as the Modbus master of the one or more outputs when a frequency of requests for commanding the one or more outputs received from the Modbus client is higher than a threshold.

[0013] Advantageously, the control device can automatically detect the Modbus master if it knows the request sending frequency of the Modbus master and the IP address of the Modbus master.

[0014] In an embodiment, the processing unit is configured to switch the Modbus server to a fallback mode to manage the one or more outputs when the Modbus server does not receive any request from the Modbus master during a communication time interval.

[0015] The control device allows automatic detection of Modbus masters in different Modbus clients and automatic monitoring of the output fallback management of the Modbus masters. In multi-master mode, it provides a simple and effective method to detect the loss of a Modbus master and independently manage the output fallback covered by different Modbus masters.

[0016] In an embodiment, the processing unit is configured to determine the communication time interval based on the estimated frequency and the minimum number of requests.

[0017] In one embodiment, the frequency is estimated after a minimum number of requests are received from the Modbus client before the end of a defined time interval.

[0018] In an embodiment, the communication time interval corresponds to a time period during which the minimum number of requests is received.

[0019] In one embodiment, the communication time interval is updated after a defined period of time or periodically.

[0020] In one embodiment, the threshold value depends on the minimum number of requests received from the Modbus clients during a defined time interval.

[0021] In one embodiment, a Modbus server in fallback mode allows a processing unit to apply a fallback policy according to which the processing unit can manage outputs on its own without receiving further requests.

[0022] In an embodiment, the processing unit is further configured to monitor an output covered by the request and assign an identifier of the Modbus client to the identifier of the output when the Modbus client is determined to be the Modbus master of the output.

[0023] In one embodiment, the Modbus server is configured to receive requests from a Modbus client via a dedicated socket and distribute a series of outputs to the dedicated socket.

[0024] In one embodiment, when a frequency of requests to command the one or more outputs received from a Modbus client is higher than a frequency of requests to command the one or more outputs received from other Modbus clients, the Modbus client is determined to be the Modbus master for all outputs.

[0025] In one embodiment, once a Modbus client has been determined as a Modbus master for one or more outputs, the processing unit PU provides the Modbus client with access to a table listing the IP address of the Modbus client, the number of requests received from said Modbus client, and a host tag linked to the identifiers of the outputs covered by the requests.

[0026] Advantageously, the control device can retrieve the current connection status so the Modbus master can check whether the control device is properly configured.

[0027] In another embodiment, a method implemented in a control device that manages outputs of a group of input / output modules and implements a Modbus server that communicates with a Modbus client according to the Modbus TCP / IP communication protocol is provided, the method comprising:

[0028] Receives a request from a Modbus client to command one or more outputs,

[0029] storing, for each request received from the Modbus client, the IP address of the Modbus client and the number of requests received from the Modbus client,

[0030] When a frequency of requests received from the Modbus client to command the one or more outputs is higher than a threshold, the Modbus client is determined to be a Modbus master for the one or more outputs.

[0031] In an embodiment, the method further comprises switching the Modbus server to a fallback mode to manage the one or more outputs when the Modbus server does not receive any request from the Modbus master during the communication time interval.

[0032] In another embodiment, a computer-readable medium is provided having a computer program embodied thereon for executing a method for managing the outputs of a group of input / output modules and implementing a Modbus server that communicates with a Modbus client according to the Modbus TCP / IP communication protocol. The computer program includes instructions for executing the steps of the method according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The detailed description is described with reference to the accompanying drawings. In the drawings, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears. Like numerals are used throughout the drawings to refer to like features and components. Some embodiments of systems and / or methods according to embodiments of the present subject matter will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0034] Figure 1 A schematic block diagram showing a communication system for managing outputs of a group of input / output modules according to one embodiment of the present invention; and

[0035] Figure 2 A flow chart illustrating a method for managing output of a group of input / output modules according to one embodiment of the present invention is shown.

[0036] The same reference number represents the same element or the same type of element on all drawings.

[0037] Those skilled in the art will appreciate that any block diagrams herein represent conceptual diagrams of illustrative systems embodying the principles of the present subject matter. Similarly, it will be understood that any flow charts, flow block diagrams, state transition diagrams, pseudocode, etc. represent various processes that can be substantially represented in a computer-readable medium and executed by a computer or processor, whether or not such a computer or processor is explicitly shown. DETAILED DESCRIPTION

[0038] The accompanying drawings and the following description illustrate specific exemplary embodiments of the present invention. Therefore, it should be understood that those skilled in the art will be able to design various arrangements that, although not explicitly described or shown herein, embody the principles of the present invention and are included within the scope of the present invention. In addition, any examples described herein are intended to aid understanding of the principles of the present invention and should be interpreted as not being limited to these specific enumerated examples and conditions. Therefore, the present invention is not limited to the specific embodiments or examples described below, but is defined by the claims and their equivalents.

[0039] In one embodiment, independent I / O islands are connected to a controller (CNT) such as a programmable logic controller (PLC) via a fieldbus such as Ethernet / IP. The islands contain headers that each drive an I / O module cluster through the controller. A cluster is a group of I / O modules physically linked together via a backplane. I / O modules are common automation modules that convert electrical signals into digital values. Within a cluster, the cluster manager and the various modules can communicate via multi-drop communication lines using their respective switches.

[0040] refer to Figure 1 ,The industrial communication system includes a control device CD, a set of I / O modules IOM and a set of controllers CNT.

[0041] The control device CD can manage communications with a group of I / O modules IOM via a multi-point communication line (e.g., a multi-point low voltage differential signaling (MLVDS) bus), or directly manage communications with the I / O modules IOM if the I / O modules are contained within the control device CD, and optionally manage communications with other control devices via Ethernet and CAN (Controller Area Network) buses. The control device CD is driven by a head that can drive other control devices. In one embodiment, the control device CD is contained within the head.

[0042] The control device CD implements a Modbus server that communicates with a Modbus client implemented in the controller CNT, such as a programmable logic controller. Furthermore, the Modbus server acts as a Modbus slave, receiving requests from one or more Modbus masters. It is assumed that the Modbus master initiates all communication transactions to the Modbus slaves, where each Modbus slave has a unique identity and responds to the Modbus master only when addressed by the Modbus master. Furthermore, a Modbus client acting as a Modbus master can send any type of request, including requests to command (e.g., write) outputs. A Modbus client not acting as a Modbus master can send requests to read outputs, but not to command outputs.

[0043] The I / O module 104 may include an analog-to-digital converter (ADC) and a digital-to-analog converter (DAC) for connecting to sensors and actuators, communication modules, digital inputs and outputs, relays, etc. The I / O module communicates with the control device CD via a communication bus in an adapted packet format.

[0044] The control device CD comprises a network interface NI configured to receive requests from a Modbus client.

[0045] The control device CD comprises a storage unit SU configured to store, for each received request, the IP address associated with the Modbus client that sent said request.

[0046] In one embodiment, a request from a Modbus client is received on one or more specific sockets of a Modbus server. The Modbus server can therefore monitor the number of requests received on the one or more specific sockets. By analyzing the content of the request, the Modbus server can extract the IP address of the Modbus client that has sent the request and the output covered by the request. The request specifies the address of the command (write) output, and the address can be related to the identifier of the output. For this reason, the control device can use regional coverage automatic discovery. For example, the identifier of the output can correspond to the address of the output or the address range of the output.

[0047] Thus, the Modbus server may create a table listing the IP addresses of the Modbus clients, the number of requests received from the Modbus client, the timestamp of each request received from the Modbus client, and optionally the identifiers of the outputs covered by the request.

[0048] The control device CD comprises a processing unit PU configured to determine that a Modbus client is a Modbus master when a frequency of requests received from said Modbus client is higher than a threshold value.

[0049] In one embodiment, the frequency of the Modbus client is estimated only when a minimum number of requests are received during a defined time interval. The frequency can be estimated at any time, such as during commissioning or during operation.

[0050] For example, after receiving a minimum number of requests (eg, 4) from a Modbus client, the request frequency is estimated through the corresponding timestamps.

[0051] If not enough requests are received from the Modbus clients, the frequency of these requests will not be estimated.

[0052] In a first embodiment, the control device CD is in single-master mode, which means that the control device CD is connected to only one Modbus client and it can accept a single Modbus master for management output.

[0053] In one embodiment, after receiving a minimum number of requests from a Modbus client, when a frequency of requests received from the Modbus client is higher than a threshold, the Modbus client is determined to be a Modbus master. In one example, the minimum number of requests is at least 4.

[0054] The threshold value depends on the minimum number of requests received from the Modbus client during a defined time interval. The minimum number of requests and the defined time interval may be initially configured by an administrator, for example depending on the Modbus server requirements.

[0055] Once a Modbus client has been identified as a Modbus master, the Modbus server may update a table listing the IP address of the Modbus client and the number of requests received from the Modbus client, with a host tag associated with the output identifiers covered by the requests.

[0056] The processing unit PU is configured to, once the Modbus client has been determined as the Modbus master, determine a communication time interval at the end of which the Modbus server switches to a fallback mode to manage the output when the Modbus server has not received any request from the Modbus master during the communication time interval.

[0057] The communication time interval depends on the estimated frequency and the minimum request quantity. In one embodiment, the communication time interval is updated after a defined time period or periodically. For example, if the minimum request quantity is received within a shorter time interval, the communication time interval is equal to the shorter time interval.

[0058] The communication interval is defined as a hold time that allows detection of the disappearance of the Modbus master (no request received during this period).

[0059] According to one illustrative example, the communication interval depends on the estimated request frequency and the minimum number of requests used to estimate the frequency. For example, the minimum number of requests received during a defined 1 second interval is 4. If 4 requests are received within 500 milliseconds, the estimated frequency is 8 requests per second and the communication interval is 500 milliseconds.

[0060] When a Modbus server switches to fallback mode to manage outputs, the Modbus server applies a fallback strategy based on which it manages the outputs on its own without receiving additional requests. In one example, the Modbus server assigns a default value to each output. In another example, the Modbus server maintains the current value of the output or assigns one or more specific values ​​before assigning the default value to the output.

[0061] In a second embodiment, the control device CD is in multi-master mode, which means that the control device CD is connected to different controllers CNT implementing Modbus clients, and it can accept different Modbus masters (corresponding to all or some Modbus clients) managing corresponding outputs (one output should be managed by one Modbus master).

[0062] In one embodiment, after receiving a minimum number of requests from a Modbus client, a Modbus client is determined to be a Modbus master for one or more outputs when a frequency of requests received from the Modbus client to command the one or more outputs is higher than a threshold. Some Modbus clients may not be determined to be Modbus masters.

[0063] In another embodiment with exclusive mode, only one Modbus client is determined as the Modbus master for all outputs when the request frequency of any output command received from the Modbus client is higher than the request frequency of any output command received from other Modbus clients.

[0064] Exclusive mode can be used when the administrator must ensure that other Modbus masters do not interfere due to errors. In this case, a reservation time can be defined to allow only the current Modbus master to manage outputs: while the current Modbus master is running, other Modbus masters cannot manage any outputs until it stops running within the reservation time.

[0065] According to the previous embodiment in the multi-master mode, the processing unit PU is further configured to, once the Modbus client is determined as the Modbus master for one or more outputs, determine a communication time interval, at the end of which, when the Modbus server has not received any request from the Modbus master during the communication time interval, the Modbus server switches to fallback mode to manage the one or more outputs.

[0066] In one embodiment, the processing unit PU provides access to a table listing, respectively, for each Modbus client identified as a Modbus master, the IP address of the Modbus client and the number of requests received from said Modbus client and a host tag linked to the identifier of the output covered by the request.

[0067] The Modbus master can then check the contents of this table to confirm that it is acting as the Modbus master for the outputs covered by the request. If the table and the actual role of the Modbus master do not match, the latter will issue an alarm to the control device.

[0068] In one embodiment, the processing unit PU is further configured to define a holding time for a set of outputs, the holding time corresponding to a time delay for the set of outputs to keep their current state without receiving a new request from the Modbus master managing the set of outputs.

[0069] refer to Figure 2 , a method for managing outputs of a group of input / output modules according to an embodiment of the present invention includes steps S1 to S5.

[0070] Initially, a control device CD managing the outputs of a group of input / output modules implements a Modbus server communicating with one or more Modbus clients according to the Modbus TCP / IP communication protocol without preconfiguring any Modbus client as a Modbus master.

[0071] In step S1 , the network interface NI of the control device CD receives a request for command output from a Modbus client.

[0072] In step S2, for each received request, the control device CD stores in a storage unit SU the IP address of the Modbus client that has sent said request and the number of requests received from said Modbus client (for example by incrementing a counter) and the identifiers of the outputs covered by the request.

[0073] For each Modbus client, the processing unit PU creates a table listing at least the IP address of the Modbus client, the number of requests received from said Modbus client and the frequency of requests received from the Modbus.

[0074] In step S3, the processing unit PU of the control device CD determines the Modbus client as a Modbus master for the one or more outputs when the frequency of requests received from the Modbus client to command the one or more outputs is higher than a threshold.

[0075] The processing unit PU updates the table listing the IP addresses of said Modbus clients with a host tag linked to the identifier of the output covered by the request.

[0076] The frequency is estimated after a minimum number of requests have been received from the Modbus client before the defined time interval has elapsed.

[0077] The processing unit PU calculates a communication time interval based on the estimated frequency and the minimum number of requests. The communication time interval should correspond to the time period during which the minimum number of requests is received (between the first and the last request of the minimum number of requests).

[0078] In one embodiment, when there are different Modbus clients connected to a Modbus server, at least some of these different Modbus clients can become Modbus masters for different outputs according to the same principle, assuming that a range of outputs is allocated to each socket dedicated to a Modbus client to distinguish the outputs covered by the request.

[0079] In one embodiment with the exclusive master mode, when the request frequency received from only one Modbus client is higher than the request frequency received from other Modbus clients, only one Modbus client among different Modbus clients is determined as the Modbus master for all outputs.

[0080] In one embodiment, when the Modbus client is determined as the Modbus master for the output, the processing unit PU defines an identifier of the output (such as the address of the output) and an identifier of the Modbus client so as to assign the identifier of the Modbus client to the identifier of the output.

[0081] In step S4 , when the Modbus server does not receive any request for one or more outputs from the Modbus master during a communication time interval, the processing unit PU is configured to switch the Modbus server to a fallback mode to manage the one or more outputs.

[0082] The communication time interval corresponds to a time period during which a minimum number of requests to command the one or more outputs is received from the Modbus master, as calculated in step S3.

[0083] In step S5, once the Modbus client has been determined to be the Modbus master for one or more outputs, the processing unit PU provides the Modbus client with access to a table listing the IP address of the Modbus client, the number of requests received from the Modbus client, and a host tag linked to the identifiers of the outputs covered by the requests. The processing unit PU may receive a request from a Modbus master in order for the Modbus master to check whether it is acting as the Modbus master for the one or more outputs.

[0084] If a Modbus master detects that the output covered by its request is not the correct Modbus master, it can issue an alarm.

[0085] Although the present invention has been described above with reference to specific embodiments, the present invention is not limited to the specific forms set forth herein. On the contrary, the present invention is limited only by the appended claims, and within the scope of these appended claims, other embodiments besides the specific embodiments described above are also possible.

[0086] Furthermore, although exemplary embodiments have been described above in some exemplary combinations of components and / or functions, it should be understood that alternative embodiments may be provided by different combinations of components and / or functions without departing from the scope of the present disclosure. Furthermore, it is specifically contemplated that certain features described alone or as part of an embodiment may be combined with other individually described features or parts of other embodiments.

Claims

1. A control device (CD) that manages the outputs of a set of input / output modules and implements a Modbus server that communicates with a Modbus client according to the Modbus TCP / IP communication protocol, include: a network interface (NI) configured to receive a request from a Modbus client to command one or more outputs, a storage unit (SU) configured to store, for each request received from the Modbus client, an IP address of the Modbus client and a number of requests received from said Modbus client, A processing unit (PU) is configured to determine a Modbus client as a Modbus master for the one or more outputs when a frequency of requests received from the Modbus client to command the one or more outputs is higher than a threshold.

2. The control device according to claim 1, in, The processing unit is configured to switch the Modbus server to a fallback mode to manage the one or more outputs when the Modbus server does not receive any request from the Modbus master during a communication time interval.

3. The control device according to claim 2, in, The processing unit is configured to determine the communication time interval based on the estimated frequency and a minimum number of requests.

4. The control device according to claim 3, in, The frequency is estimated after receiving the minimum number of requests from the Modbus client before the end of a defined time interval.

5. A control device according to claims 3 and 4, in, The communication time interval corresponds to a time period during which the minimum number of requests has been received.

6. The control device according to claim 5, in, The communication time interval is updated after a defined period of time or periodically.

7. A control device according to any one of the preceding claims, in, The threshold value depends on the minimum number of requests received from the Modbus clients during a defined time interval.

8. The control device according to claim 2, in, The Modbus server in fallback mode allows the processing unit to apply a fallback strategy according to which the processing unit can manage the outputs on its own without receiving further requests.

9. A control device according to any one of the preceding claims, in, The processing unit (PU) is further configured to monitor an output covered by the request and assign an identifier of a Modbus client to an identifier of the output when the Modbus client is determined to be the Modbus master for the output.

10. A control device according to any one of the preceding claims, in, The Modbus server is configured to receive a request from a Modbus client via a dedicated socket and distribute a series of outputs to the dedicated socket.

11. A control device according to any one of the preceding claims, in, When a frequency of requests to command the one or more outputs received from a Modbus client is higher than a frequency of requests to command the one or more outputs received from other Modbus clients, the Modbus client is determined to be a Modbus master for all outputs.

12. A control device according to any one of the preceding claims, in, Once a Modbus client has been identified as a Modbus master for one or more outputs, the processing unit PU provides the Modbus client with access to a table listing the IP address of the Modbus client, the number of requests received from the Modbus client and the host tag linked to the identifiers of the outputs covered by the requests.

13. A method implemented in a control device (CD) that manages the outputs of a group of input / output modules and implements a Modbus server that communicates with a Modbus client according to the Modbus TCP / IP communication protocol, the method include: Receive (S1) a request from a Modbus client to command one or more outputs, storing (S2) for each request received from the Modbus client the IP address of the Modbus client and the number of requests received from said Modbus client, When the frequency of requests for commanding the one or more outputs received from the Modbus client is higher than a threshold, determining (S3) the Modbus client as a Modbus master for the one or more outputs.

14. The method according to claim 13, further comprising switching (S4) the Modbus server to a fallback mode to manage the one or more outputs when the Modbus server does not receive any request from the Modbus master during a communication time interval.

15. A computer readable medium having embodied thereon a computer program for executing the method for managing the output of a group of input / output modules according to any one of claims 13 to 14.