Loading…
Loading…
Resources · Interactive Guide
The protocol every RS-485 device speaks. Watch a master poll three real slaves in turn — a meter, a VFD and a sensor — then see the four register types and function codes behind it.
One twisted pair(A/B), daisy-chained · every device at the same 9600 8N1 · each slave a unique ID · 120 Ω at both ends
| Code | Name | Acts on | R/W |
|---|---|---|---|
| 1 · 0x01 | Read Coils | Coils | Read |
| 2 · 0x02 | Read Discrete Inputs | Discrete Inputs | Read |
| 3 · 0x03 | Read Holding Registers | Holding Registers | Read |
| 4 · 0x04 | Read Input Registers | Input Registers | Read |
| 5 · 0x05 | Write Single Coil | Coils | Write |
| 6 · 0x06 | Write Single Register | Holding Registers | Write |
| 15 · 0x0F | Write Multiple Coils | Coils | Write |
| 16 · 0x10 | Write Multiple Registers | Holding Registers | Write |
Every device on the bus must use the identical baud rate and framing — e.g. 9600 8N1. One device at the wrong speed and its data comes back as garbage.
Every slave needs its own address 1–247 — no duplicates on one bus, or two devices answer at once and collide. IDs don't have to be sequential.
RS-485 runs on a single twisted pair (A/B), device to device in a line — not a star. Fit a 120 Ω terminator at each far end to stop reflections.
The master always speaks first. Only the addressed slave replies — everyone else stays quiet. Address 0 is a broadcast to all.
Nothing happens until the master asks. The slave answers that one question, then waits. No unsolicited data from a slave.
Ask for a register that doesn't exist and the slave replies with an exception (e.g. 02 illegal address) instead of data.
Runs entirely in your browser — a Modbus RTU teaching simulator, no hardware needed.