Simulator
A Modbus RTU simulator on a real RS-485 pair
LabWired simulates a Modbus RTU bus at the byte level. The master firmware runs unmodified and every frame on the pair is decoded.
In the lab below, an Arduino Uno polls two XY-MD02 temperature and humidity sensors with the ModbusMaster library. A MAX485 gates the bus.
Live lab, running in your browser. Open the full lab →
What is simulated
- XY-MD02 slave from the manufacturer manual: input registers 0x0001 and 0x0002 (temperature, humidity) and holding registers 0x0101 to 0x0104.
- Function codes 03, 04, 06 and 10, CRC-16, 3.5-character framing and standard exceptions 01 to 03.
- MAX485: DE and /RE decide what crosses, with half-duplex echo. Bus contention is reported.
What is left out
We list the gaps so you know when to reach for a bench.
- The XY-MD02 text protocol (READ, AUTO, BR:, TC:) and parity are not modelled.
- The MAX485 is a byte-level gate. There are no line levels, termination or bias.
Sources
Checked on 22 October 2026 against:
Related
Other simulators