CAN-ModBus based-to-MQTT gateway and communication system
A CAN bus and gateway technology, applied in the field of CAN-ModBus-to-MQTT gateway and communication system, can solve the problems of difficult expansion deployment, single communication mode, bus data conflict, etc., and achieve the effect of convenient deployment and real-time communication
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] A gateway based on CAN-ModBus to MQTT, see figure 1 ,include:
[0045] Multiple CAN interfaces: used to connect with external devices, receive data encapsulated in CAN protocol format from external devices through the CAN bus, and convert the data into ModBus pending data encapsulated in ModBus protocol format; also used to convert ModBus The encapsulated data is converted into data encapsulated in the CAN protocol format and sent to the external device;
[0046] Specifically, see figure 2 , CAN interface completes the conversion between CAN protocol format and ModBus protocol format. Two CAN interfaces can be set, for example figure 1 shown in CAN1 and CAN2. The gateway serves as the host terminal of the ModBus protocol, and the external device serves as the slave terminal of the ModBus protocol. The external devices are referred to as peripherals for short in the drawings. The external device may be a device supporting the CAN-ModBus protocol, for example, a har...
Embodiment 2
[0055] Embodiment 2 On the basis of Embodiment 1, the following differences are added:
[0056] Since the CAN protocol can transmit valid data at most 8 bytes at a time, the length of valid data sent and received by the gateway through the CAN bus cannot exceed 8 bytes, while the ModBus protocol has no limit on the data length. This creates length inequalities between the protocols.
[0057] For this reason, in the gateway, the CAN interface is specifically used for:
[0058] Create a one-way circular linked list, the node space size of the one-way circular linked list is 8 bytes;
[0059] Specifically, the number of nodes in the one-way circular linked list is configurable, the number ranges from 1 to 10, and the default number is 1. The size of the node space is 8 bytes, so that each node just stores the longest valid data that CAN protocol can transmit at one time.
[0060] When multiple data packets are received through the CAN bus, judge the start packet, intermediate ...
Embodiment 3
[0068] Embodiment 3 On the basis of other embodiments, the following content is added:
[0069] see image 3 , the ModBus protocol unit is specifically used for:
[0070] The ModBus protocol unit analyzes the ModBus data to be processed to obtain the register address;
[0071] Converting the register address and the data stored in the register address into character strings, splicing with "&" as a separator, and separating the data stored in each register address with commas to obtain the MQTT package data;
[0072] Send the MQTT encapsulated data to the MQTT proxy server through a message publishing mechanism.
[0073] Specifically, the gateway, as the ModBus host, needs to save the register address of the requested data, and then convert the register address and the corresponding data into a string after parsing the received register data, using "&" as the separator , stitched together. For example, "512&10" means that the data content of the register whose address is 51...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com