Inhaltsübersicht
Umschalten aufWas sind die Protokolle Modbus RTU und Modbus TCP?
In the 1970s, the field of industrial automation was undergoing rapid development. The rapid development of the industry also brought some problems. At that time, different equipment manufacturers used different protocols, preventing their equipment from communicating with each other.
Um dieses Problem zu lösen, wurde das Modbus-Protokoll entwickelt. Es ist ein offenes, standardisiertes Protokoll, das eine Vielzahl von Datentypen und Funktionscodes unterstützt, um unterschiedliche Kommunikationsanforderungen zu erfüllen. Modbus-Protokoll hat 3 Typen, darunter ASCII, RTU und TCP.
Wenn das Modbus-Protokoll die Übertragung über die serielle Schnittstelle verwendet, können die ersten beiden Typen gewählt werden, aber die Daten müssen geprüft werden. Bei der Ethernet-Übertragung wird der TCP-Typ verwendet, bei dem keine Prüfsummen erforderlich sind. Modbus ASCII wird aufgrund der Ineffizienz der Datenübertragung, die hauptsächlich ASCII-Codes verwendet, weniger häufig eingesetzt. Im Gegensatz dazu eignen sich Modbus RTU und Modbus TCP besser für den Einsatz in modernen industriellen Umgebungen, die eine höhere Übertragungseffizienz erfordern. In diesem Artikel werden wir diese beiden Protokolle analysieren, ihre Funktionsprinzipien und Anwendungsszenarien vorstellen und hoffen, Ihnen damit behilflich zu sein.

Prinzip der Modbus-Kommunikation
Modbus communication is the principle that it uses a master-slave communication mode. It means that there are master and slave devices, and the master device can initiate the transmission and then send a request to the slave device. The slave device cannot answer the request actively, but can only answer according to the request of the master device. The slave device then performs the requested operation and then sends a response to the master device. The master device receives the response and parses it, thus completing the communication process.
Ein Master-Gerät kann mit einem oder mehreren Slave-Geräten gleichzeitig verbunden sein, aber es kann nur ein Master-Gerät und ein Slave-Gerät in einer Kommunikation geben. Wenn ein Master-Gerät mit einem Slave-Gerät verbunden ist, kommunizieren sie im Unicast-Modus miteinander. Ist jedoch das Master-Gerät mit mehr als einem Slave-Gerät verbunden, muss für die Kommunikation der Broadcast-Modus gewählt werden.
Wie Modbus RTU funktioniert

Modbus RTU supports a variety of electrical interfaces, such as RS-232, RS 485 and RS-422. It transmits data in binary form, and each byte contains two 4-bit hexadecimal numbers. RTU protocol commands consist of 5 parts: address code, function code, start address, data, and check code. For example, send instruction: 01 03 76 83 00 0C AE 6F, where 01 is the address code, on behalf of the slave address; 03 is the function code, which means “read”; 76 83 is the address of the register; 00 0C is the number of read registers; AE 6F represents the CRC checksum.
Modbus RTU Anwendungsszenarien
Because Modbus RTU is simple and stable in binary form for data transmission, it is very suitable for long-distance communication, difficult wiring scenarios, or scenarios with a wide distribution of devices. For example, industrial automation scenarios, small control systems, etc.
Modbus TCP Arbeitsprinzip

Modbus TCP is created so that Modbus data can be transmitted on Ethernet, using the TCP502 port. Modbus TCP is based on Modbus RTU, plus the MBAP header. Since TCP is based on a reliable connection service, it no longer uses CRC checksums but relies on TCP’s own error detection and correction mechanisms. For example, send the command: 68 68 00 00 00 06 01 03 33 65 00 04. Among them, 68 68 is the message sequence number; 00 00 indicates that it is the Modbus TCP protocol is used; 00 06 indicates the number of subsequent bytes; 01 is the slave address; 03 is the function code; 33 65 indicates the register address; 00 04 is the number of registers.
Modbus TCP Anwendungsszenarien
Modbus TCP wird wegen seiner hohen Übertragungsgeschwindigkeit und Zuverlässigkeit häufig in komplexeren Szenarien eingesetzt. Zum Beispiel bei großen Steuerungssystemen, Gebäudeleitsystemen usw.
In practice, we need to consider whether to use the Modbus RTU or Modbus TCP protocol. If you have an existing network infrastructure and need to exchange large amounts of data with a fast response, TCP is a good choice. If you need simple, low-cost, long-distance communication, then using RTU is a wise choice.
Modbus RTU and Modbus TCP are like a pair of good friends; they each have their advantages, and together they help effective data exchange between devices. With the development of Industry 4.0, they will be integrated into more new technologies. Let’s look forward to the future; they will create more value for the development of industrial automation!
Agnes Wang is an IoT Solutions Specialist at IOTRouter, focusing on industrial IoT gateways, edge computing, and industrial automation solutions.
She specializes in industrial communication technologies, including Modbus, IEC 60870-5-104, MQTT, OPC UA, PLC integration, and remote monitoring applications. She contributes to technical articles and application guides covering industrial IoT solutions, protocol conversion, and edge computing.
- Agnes Wang
- Agnes Wang
- Agnes Wang



