
Who asks, who answers
RS-485 lets any station drive the pair, so something above it has to decide who speaks. In Modbus the client asks, exactly one server answers, and a server never speaks unasked. A request that no one answers looks the same as a station that is not there.
One asks, one answers
Lesson 5 ended on a rule the wire does not enforce: one driver at a time. Modbus enforces it. One device, the foreperson on the bench, sends a request. Every station hears it and the one it names replies.
A station never speaks unasked and never talks to another station. That is why a Modbus pair needs no arbitration: there is one device allowed to ask and one allowed to answer.
The older words for these roles are master and slave. The current ones are client and server.
The address
A request starts with one byte, the address of the station it is for. A station answers its own address and ignores the rest.
The address is a number set in the station, with switches, a menu or a register. It is not a place on the cable: the third station along may be 41 and the fifth 3. Addresses 1 to 247 belong to stations, and 248 to 255 are reserved.
Address 0
Address 0 belongs to nobody. A request to it is a broadcast: every station acts on it and none replies. Only write functions can be broadcast.
The client cannot tell a delivered broadcast from a lost one, so it waits a turnaround delay, typically 100 to 200 ms, before the next request.
No reply
A request to an address with no station is answered by silence. The client starts a response timeout when it finishes sending and gives up when it runs out, typically a second or more at 9600 baud.
A timeout means only that no valid reply arrived. A missing station, a wrong address and a damaged request look the same, which is the last lesson's subject. The ESP32 side is in RS-485 and Modbus on the ESP32.
Common mistakes
- Counting stations along the cable to find an address. The address is a setting inside the station. Read it off the device.
- Giving two stations the same address. Both answer at once, the replies collide, and the client sees damage or nothing.
- Waiting for a reply to a broadcast. There is none, by design. Broadcast only writes, and let the turnaround delay pass.
Edit this page — content/fundamentals/rs485-modbus/who-asks-who-answers.mdx
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.