How Does Modbus RTU Exchange Data?
- Basic
- Article
- Ages 15+
- 4 min read

Modbus RTU is how devices exchange data by request and response: a master sends a request; a slave normally answers a valid unicast, while slaves should not reply to broadcasts. The data travels in binary and messages are split by silent gaps on the line.
Contents
- Master
- Slaves
What you will learn
- Describe the roles of master and slave.
- Name the parts of a Modbus RTU message.
- Explain why the silent gap matters.
Before you start
It helps to know what UART and differential signals are.
How does Modbus ask and answer?
Modbus is a request-response protocol implemented using a master-slave relationship. The initiating device, the master, is responsible for initiating every interaction. A conversation is always started by a master in the network.
For unicast, the address identifies the receiving slave; the other slaves ignore that request. A slave normally replies to a valid unicast request sent to its address. Address 0 is the broadcast address: slaves should process a valid write request sent to it, and none should reply.
- Master
- Slave with the matching address
- Request
- Response
What parts does a Modbus RTU message have?
With Modbus RTU the data is exchanged in a binary format, where each byte of information is coded in one communication byte. A message holds an address, a function code, data and an error check.
Modbus masters must request access to the slave's data through various function codes. Not all Modbus devices recognize the same set of function codes.
- Address
- Function code
- Data
- Error check
When answering, a slave normally uses the same function code as in the request. In an exception response, the most significant bit of the original function code is set. An error check is appended so the receiver can check whether a communication error occurred.
How does a receiver know a message has ended?
Modbus RTU uses time gaps of silence on the communication line for framing. So each message has to be sent as a continuous stream; gaps between characters must stay below the framing threshold.
A device configured for Modbus ASCII cannot understand Modbus RTU messages and vice versa, so both sides must use the same mode.
- Silent gap
- One continuous message
Real-world example
With an adult, think of an electricity meter in a building. The monitoring system asks the meter for a value, and only the meter with the right address answers.
Common misunderstandings
A slave can send data whenever it wants. A conversation is always started by a master.
Every Modbus device understands every function code. Not all devices recognize the same set of function codes.
Frequently asked questions
How do master and slave differ?
The master initiates a request; a slave normally replies to a valid unicast request sent to its address. No slave should reply to broadcast address 0.
What is in a Modbus RTU message?
An address, a function code, data and an error check.
What does a function code with its highest bit on mean?
In an exception response, the most significant bit of the original function code is set.
How does Modbus RTU mark frames?
With time gaps of silence on the communication line.
Summary
- Modbus is request-response: the master starts; a slave normally answers valid unicast, while slaves should not reply to broadcasts.
- A Modbus RTU message holds an address, a function code, data and an error check.
- Silent gaps mark frames, so each message must be sent continuously.
Terms in this article
English and Vietnamese terms, with the meanings used here. Hover, tap or Tab to a term with a dotted underline for an explanation as you read.
- Modbus RTU
- The Modbus mode that sends binary data and marks frames with silent gaps on the line.
- Master and slaveMaster và slave
- The master initiates requests; a slave normally responds to valid unicast, while slaves should not reply to broadcasts.
- Function codeMã chức năng
- A code in the message telling which operation the master wants the slave to perform on data.
- Message addressĐịa chỉ trong bản tin
- A field identifying the recipient of a unicast request; address 0 is for broadcast.
- Error checkKiểm tra lỗi
- A part appended to a message so the receiver can detect a communication error.
This article is not marked as viewed
Spotted something wrong or unsafe?
Tell the administrator by email. The message already has the article title and address.
You may also like
BasicHow Does an ESP32 Board Run and Communicate?
An ESP32 board pairs an ESP32 module with a USB port and pin headers. See its parts, how firmware is loaded over serial, and its Wi-Fi and Bluetooth.
Internet of Things (IoT)4 min read
BasicHow Does Arduino Run setup and loop?
An Arduino sketch has two functions: setup runs once and loop repeats forever. See the run order, why loop never pauses and what delay does.
Internet of Things (IoT)4 min read
StarterOverview of Firmware and IoT Networking
An overview of IoT firmware, the setup and loop cycle, how MQTT sends messages over a network, and security guidance published by NIST.
Internet of Things (IoT)4 min read
BasicHow Does MQTT Route Messages Through a Broker?
MQTT is a publish and subscribe protocol: a broker takes messages by topic and passes them to subscribers. Covers topics, wildcards and three QoS levels.
Internet of Things (IoT)4 min read
Sources
These sources are written for older readers. If they feel hard, read them with an adult.
- Modbus, specifications and in depth tutorial(opens in a new tab)
Lammert BiesTier C: other sourcesRead on October 29, 2026
- The Modbus Protocol In-Depth(opens in a new tab)
NITier C: other sourcesRead on October 29, 2026
