Modbus rtu communication protocol format details

MODBUS is a soft communication protocol advocated by MODICON. It has been gradually recognized as the standard communication protocol after the actual application of most companies. As long as data communication or transmission is carried out according to this protocol, different systems will be used. Can communicate. At present, this protocol is widely used in the RS232/RS485 communication process.

There are two commonly used MODBUS communication protocols, one is MODBUS ASCII and the other is MODBUS RTU. Generally speaking, the communication data is small and the text communication is mainly MODBUS ASCII protocol. When the communication data volume is large and the binary value is used, the MODBUS RTU protocol is adopted.

In the actual application process, in order to solve a certain special problem, people like to modify the MODBUS protocol to meet their own needs (in fact, people often use their own defined protocols to communicate, this can solve the problem, but not very standard). A more common usage is to modify the protocol in a small amount, but attach the protocol format to the software manual or directly in the help, which facilitates the user's communication.

Modbus rtu communication transmission method

The communication transmission is divided into independent information headers and transmitted encoded data. The following communication transfer definitions are also compatible with the MODBUS RTU communication protocol:

Modbus rtu communication protocol format details

Initial structure = ≥ 4 bytes of time address code = 1 byte function code = 1 byte data area = N bytes

Error check = 16-bit CRC code end structure = ≥ 4 bytes of time

Address code: The address code is the first byte of the communication transmission. This byte indicates that the slave set by the user to receive the address code will receive the information sent by the host. And each slave has a unique address code, and the response echoes start with their respective address codes. The address code sent by the master indicates the slave address to which it will be sent, and the address code sent by the slave indicates the slave address returned.

Function code: The second byte of the communication transmission. The ModBus communication protocol defines function numbers from 1 to 127. This instrument only uses some of the function codes. As the host requests to send, the function code tells the slave what action to perform. As a slave response, the function code sent by the slave is the same as the function code sent from the master, and indicates that the slave has responded to the master. If the highest bit of the function code sent by the slave is 1 (such as the function code is 127 at the same time), it indicates that the slave does not respond to the operation or sends an error.

Data area: The data area differs according to different function codes. The data area can be the actual value, the set point, and the address that the host sends to the slave or slave to the host. CRC code: Two-byte error detection code.

Modbus rtu communication protocol format

The Modbus protocol is a versatile language applied to electronic controllers. Through this protocol, controllers can communicate with each other and between controllers via a network (such as Ethernet) and other devices. It has become a common industry standard. With it, control equipment produced by different manufacturers can be connected into an industrial network for centralized monitoring. This protocol defines a message structure that a controller can recognize, regardless of the network through which they communicate. It describes how a controller requests access to other devices, how to respond to requests from other devices, and how to detect errors and record them. It develops a common format for message domain patterns and content. The Modbus communication protocol has 3 modes. The Modbus RTU module manufacturer is the WCTU for communication, supports the Modbus RTU/Modbus ASCII/ModbusTCP protocol, and multi-channel autonomously defines analog acquisition and digital/digital interfaces.

Medical Atomization

The utility model relates to a medical atomization treatment and humidifying device belonging to the technical field of medical equipment and household appliances.


Professional Medical Atomization manufacturer is located in China, including Medical Vape,Dose Control Vape Pen,Supersonic Wave Vape, etc.2-2

Medical Atomization,Medical Vape,Dose Control Vape Pen,Supersonic Wave Vape

Shenzhen MASON VAP Technology Co., Ltd. , https://www.cbdvapefactory.com

Posted on