Modbus communication gateway equipment based on CAN bus

By designing a Modbus communication gateway device based on CAN bus, the problem of difficulty in expanding functional modules of the RS485 bus in multi-master and multi-slave application scenarios is solved, and efficient Modbus communication and multi-channel communication capabilities are achieved.

CN222655175UActive Publication Date: 2025-03-21JIANGSU DAQO KFINE ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420777984.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-03-21
Estimated Expiration
2034-04-16

AI Technical Summary

Technical Problem

In the existing low-voltage circuit breaker communication system, the limitations of the RS485 bus make it difficult to expand functional modules in the application scenarios of multiple masters and multiple slaves, and cannot meet the scenarios where multiple communications and real-time requirements are required on-site.

Method used

A Modbus communication gateway device based on CAN bus is designed, including a communication gateway, master control, master station and node. The main control and node are connected through the CAN communication circuit, and the RS485 communication circuit is connected to the main station to realize the redundant design of Modbus communication and independent two-channel communication.

Benefits of technology

It realizes plug-and-play Modbus communication without parameters, supports redundant communication of one Modbus and two Modbus communications independent of each other and does not interfere with each other, and can read, write and upgrade data and program to other device nodes on the CAN bus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222655175U_ABST
    Figure CN222655175U_ABST
Patent Text Reader

Abstract

The utility model discloses a Modbus communication gateway device based on a CAN bus, which comprises a communication gateway, a master controller, a master station and nodes which are mutually combined for use to play a role, parameter configuration is not needed, plug and play is realized, Modbus communication can be realized more quickly and more conveniently, redundant communication of one Modbus can be realized, two Modbus communications are mutually independent and do not interfere with each other, and the communication efficiency is improved. And data reading and writing and program upgrading can be carried out on other equipment nodes on the CAN bus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the field of communication gateways, in particular to a Modbus communication gateway device based on a CAN bus. Background Art

[0002] In the low-voltage circuit breaker communication system, the conventional intelligent controller is based on the RS485 bus mode, and the communication mode is Modbus communication protocol or DLT645 communication protocol, which is integrated in the controller. Different communication modes require the replacement of different controllers or the use of protocol converters to achieve different communication modes. With the intelligent application of low-voltage circuit breakers, the circuit breakers have more and more extended functions, such as load monitoring, energy management, rich digital IO, flexible and diverse communication methods, etc. Integrating all functions into the intelligent controller will cause a waste of resources and efficiency.

[0003] If a conventional low-voltage circuit breaker requires two independent communications, one channel of communication data is transmitted to the local terminal control or cabinet display unit, and the other channel of communication data is sent to the cloud. However, due to the limitations of the Modbus communication rate and the one-master-multiple-slave feature of Modbus, it cannot meet the simultaneous data requests of the two master stations for the circuit breaker, so it cannot meet the scenarios where multi-channel communication is required on site.

[0004] In addition, due to the limitations of the RS485 bus, in a multi-master and multi-slave application scenario, the master must own the bus to operate the slave, which makes it difficult to expand functional modules, especially modules with high real-time requirements, whose functions cannot meet the requirements. Utility Model Content

[0005] In view of the deficiencies in the prior art, the utility model provides a Modbus communication gateway device based on a CAN bus to solve the above problems.

[0006] In order to achieve the above objectives, the utility model is implemented through the following technical solutions.

[0007] A Modbus communication gateway device based on a CAN bus comprises a communication gateway, a master control, a master station and a node. The communication gateway comprises a first communication gateway and a second communication gateway. The master station comprises a first master station and a second master station. The first communication gateway is respectively connected to the first master station and the master control. The second communication gateway is respectively connected to the node and the second master station. The node is provided with a plurality of nodes and is also connected to the master control. The first communication gateway and the second communication gateway have the same structure and both comprise an MCU processor, an RS485 communication circuit, a CAN communication circuit, a power supply circuit and a dip switch indicator light circuit. The RS485 communication circuit, the CAN communication circuit, the power supply circuit and the dip switch indicator light circuit are all connected to the MCU processor through a line, and no parameter configuration is required. The device is plug-and-play, and Modbus communication is realized faster and more conveniently. Redundant communication of one Modbus can be realized. Two Modbus communications are independent of each other and do not interfere with each other. Data can be read and written and programs can be upgraded for other device nodes on the CAN bus.

[0008] Preferably, the communication gateway is connected to the main control via a CAN communication circuit.

[0009] Preferably, the communication gateway connects nodes via a CAN communication circuit.

[0010] Preferably, the communication gateway is connected to the first master station via an RS485 communication circuit.

[0011] Preferably, the communication gateway is connected to the second main station via an RS485 communication circuit.

[0012] Preferably, the DIP switch indicator light circuit includes a DIP switch and an indicator light circuit.

[0013] Compared with the prior art, the utility model discloses a Modbus communication gateway device based on CAN bus, including a communication gateway, a master control, a master station and a node. The four are used in combination with each other to play a role. No parameter configuration is required. It is plug-and-play and can realize Modbus communication faster and more conveniently. It can also realize redundant communication of one Modbus. The two Modbus communications are independent of each other and do not interfere with each other. In addition, data can be read and written and programs can be upgraded for other device nodes on the CAN bus. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 This is a schematic diagram of the structure of a Modbus communication gateway device based on CAN bus in the utility model;

[0015] Figure 2 This is a schematic diagram of the structure of a Modbus communication gateway device based on CAN bus in the utility model;

[0016] Figure 3 The present invention is a method flow chart of a Modbus communication gateway device based on CAN bus. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments.

[0018] A Modbus communication gateway device based on CAN bus comprises a communication gateway, a main control, a main station and a node. The communication gateway comprises a first communication gateway and a second communication gateway. The main station comprises a first main station and a second main station. The first communication gateway is respectively connected to the first main station and the main control. The second communication gateway is respectively connected to the node and the second main station. The node is provided with a plurality of nodes and is also connected to the main control. The first communication gateway and the second communication gateway have the same structure and both comprise an MCU processor, an RS485 communication circuit, a CAN communication circuit, a power supply circuit and a dip switch indicator light circuit. The RS485 communication circuit, the CAN communication circuit, the power supply circuit and the dip switch indicator light circuit are all connected to the MCU processor through lines. The communication gateway is connected to the main control through the CAN communication circuit, the communication gateway is connected to the node through the CAN communication circuit, the communication gateway is connected to the first main station through the RS485 communication circuit, the communication gateway is connected to the second main station through the RS485 communication circuit, and the dip switch indicator light circuit comprises a dip switch and an indicator light circuit.

[0019] The communication gateway supports the first master station to poll the data of the master control or other nodes. The first communication gateway does not need to be configured and is plug-and-play. The communication gateway supports redundant design and is connected to the second communication gateway to realize the second master station to poll the data of the master control or other nodes. The communication address, baud rate and other information required for Modbus communication are actively reported to the communication gateway by the master control when the communication gateway is connected to the system or when the system is powered on. After receiving the parameter information, the communication gateway reinitializes the Modbus receiving port.

[0020] The MCU processor processes the message data and forwards the message data.

[0021] The dip switch in the dip switch indicator circuit realizes redundant Modbus communication through different positions of the dip switch and different node numbers of the communication gateway on the CAN communication circuit.

[0022] The indicator light circuit in the DIP switch indicator light circuit indicates the interaction of communication messages and the node status of the communication gateway in the CAN network.

[0023] The Modbus communication parameters of the communication gateway are sent to the communication gateway by the master control when the system is powered on or connected to the system. After the communication gateway receives the Modbus communication parameters, it reinitializes the serial port and waits for the request message from the master station after the initialization is completed.

[0024] The first master station sends the request message to the first communication gateway, and the first communication gateway pre-processes the frame message. If it is a message requesting the master control, the first communication gateway sends the Modbus message to the master control in a non-periodic manner via the CAN bus. After the master control completes the processing, it sends the Modbus reply message to the first communication gateway via the CAN bus. The first communication gateway then sends the reply message to the first master station to complete a data interaction.

[0025] The first master station sends the request message to the communication gateway, and the first communication gateway pre-processes the frame message. If it is a message requesting other nodes, the first communication gateway sends the Modbus message to other nodes in a non-periodic manner through the CAN bus. After the other nodes complete the processing, they send the Modbus reply message to the first communication gateway through the CAN bus. The first communication gateway then sends the reply message to the first master station to complete a data interaction.

[0026] The second master station sends the required request message to the second communication gateway, and the second communication gateway pre-processes the frame message. If it is a message requesting the master control, the second communication gateway sends the Modbus message to the master control in a non-periodic manner via the CAN bus. After the master control completes the processing, it sends the Modbus reply message to the second communication gateway via the CAN bus. The second communication gateway then sends the reply message to the second master station to complete a data interaction.

[0027] The second master station sends the required request message to the communication gateway, and the second communication gateway pre-processes the frame message. If it is a message requesting other nodes, the second communication gateway sends the Modbus message to other nodes in a non-periodic manner via CAN. After the other nodes complete the processing, they send the Modbus reply message to the second communication gateway via the CAN bus. The second communication gateway then sends the reply message to the second master station to complete a data interaction.

[0028] After the communication gateway forwards the request message to the master or other nodes, it enters the waiting state for the reply message. If it does not receive the reply message from the corresponding node within the timeout period, the communication gateway enters the waiting state for the master station request message again. Any reply received from the corresponding node afterwards will be discarded.

[0029] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0031] The above description is only the preferred embodiment of the utility model, and is not intended to limit the utility model. For those skilled in the art, the utility model can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the utility model shall be included in the protection scope of the utility model.

Claims

1. A Modbus communication gateway device based on CAN bus, characterized in that: It includes a communication gateway, a main control, a main station, and a node. The communication gateway includes a first communication gateway and a second communication gateway. The main station includes a first main station and a second main station. The first communication gateway is respectively connected to the first main station and the main control. The second communication gateway is respectively connected to the node and the second main station. There are several nodes, which are also connected to the main control. The first communication gateway has the same structure as the second communication gateway, and both include an MCU processor, an RS485 communication circuit, a CAN communication circuit, a power supply circuit, and a dip switch indicator light circuit. The RS485 communication circuit, the CAN communication circuit, the power supply circuit, and the dip switch indicator light circuit are all connected to the MCU processor through lines.

2. The Modbus communication gateway device based on CAN bus according to claim 1, characterized in that: The communication gateway is connected to the main control via a CAN communication circuit.

3. The Modbus communication gateway device based on CAN bus according to claim 1, characterized in that: The communication gateway connects nodes via a CAN communication circuit.

4. The Modbus communication gateway device based on CAN bus according to claim 1, characterized in that: The communication gateway is connected to the first main station via an RS485 communication circuit.

5. The Modbus communication gateway device based on CAN bus according to claim 1, characterized in that: The communication gateway is connected to the second main station via an RS485 communication circuit.

6. The Modbus communication gateway device based on CAN bus according to claim 1, characterized in that: The DIP switch indicator light circuit comprises a DIP switch and an indicator light circuit.