What is RS485?
RS485 is a standard for electrical transmission, not a protocol. The data travels as a voltage difference between two wires, usually called A and B, sometimes D+ and D−. Because the receiver only evaluates the difference, interference that affects both wires equally largely cancels out. That is why RS485 also works in control cabinets with frequency converters and over long distances.
Classically, one segment handles 32 nodes (unit loads); modern drivers load the bus with only a fraction of that. The line can be about 1200 m long, less at high baud rates.
Various protocols run over RS485, besides Modbus RTU for example BACnet MS/TP. With an RS485 power meter, it is therefore only clear together with the protocol how it is read.
How is an RS485 bus cabled correctly?
- Lay it as a line: from device to device, without a star and without long branches.
- Fit one 120 Ω terminating resistor at each of the two ends of the line, not at every device.
- Use twisted, shielded data cable, ideally with a characteristic impedance of around 120 Ω.
- Run the reference ground (GND) along with it if the devices are far apart or powered differently.
- Set the same baud rate, parity and stop bits on all devices.
The most common pitfalls when building the bus are described in the article Modbus RTU over RS-485: the five most common pitfalls.
What is Modbus RTU?
Modbus is an open protocol that Modicon developed for controllers in 1979. RTU stands for Remote Terminal Unit and denotes the binary variant for serial lines. A master, such as a PLC, a data logger or an energy management system, sends a request to a slave address, and only that device answers. A slave never transmits of its own accord.
A telegram consists of address, function code, data and a CRC16 checksum. Between two telegrams there is a pause of at least 3.5 character times, by which the devices recognise beginning and end.
| Function code | Meaning | Typical use |
|---|---|---|
| 03 | Read holding registers | Measured values and settings |
| 04 | Read input registers | Measured values |
| 06 | Write a single register | Change a setting |
| 16 | Write multiple registers | Write several values in one block |
How do you read Modbus registers correctly?
Modbus only knows 16-bit registers. A meter reading with 32 or 64 bits is spread over two or four consecutive registers. Whether the high-order word comes first is up to each manufacturer. If a system delivers nonsensical values, the byte or word order is usually swapped.
The way addresses are counted also differs: some manuals count from 0, others from 1. If a value is shifted by exactly one register, that is almost always the reason.
When does Modbus RTU over RS485 fit?
Modbus RTU fits when a controller or data logger polls meters directly in the same control cabinet or building and no network runs to the meters. With many meters in several buildings or several target systems, a gateway pays off. The comparison with the network variant is in the article Modbus TCP or Modbus RTU? and on the page What is Modbus TCP?.
RS485 and Modbus RTU with EMU devices
The RS485 power meter EMU Professional II speaks Modbus RTU, as EMU Professional II 3/100 for direct connection up to 100 A or as 3/5 for CT connection.
The EMU M-Center has two RS485 ports, reads up to 64 Modbus RTU devices and passes the values on via BACnet IP or MQTT.