Meter interfaces

RS-485 vs Modbus vs RS-232

Is Modbus the same as RS485? No: RS-485 is the physical layer and Modbus the protocol that runs on it. A comparison table, Modbus RTU, and RS-232 vs RS-485.

RS-485 and Modbus are not alternatives: RS-485 is a physical layer and Modbus is a protocol. RS-485 defines the electrical signal on a twisted pair and how many devices can share it. Modbus defines the requests, the device addresses and the registers that travel over a link. Modbus RTU usually runs on RS-485, which is why the two names appear together, but Modbus TCP runs over Ethernet with no RS-485 at all.

What is Modbus explains the protocol on its own: the data model, the function codes and a complete request and reply.

RS-485 vs Modbus: the difference

RS-485Modbus
What it isAn electrical interface standard, TIA/EIA-485-AA communication protocol, published by the Modbus Organization
LayerPhysical layer (OSI layer 1)Application protocol (layer 7), with a serial line protocol at layer 2 for RTU and ASCII
What it definesDifferential signalling on a twisted pair, receiver thresholds and unit loadsFunction codes, the four data tables, exception responses, framing and addressing
Runs onCopper twisted pair, two-wire or four-wireRS-485 or RS-232 (Modbus RTU and ASCII), or TCP/IP (Modbus TCP)
Device addressesNone1 to 247 on a serial line; an IP address and a unit identifier on TCP
Error checkNoneA 16-bit CRC in RTU, an LRC in ASCII, the TCP checks in Modbus TCP
What you set on siteWiring, termination and biasBaud rate, parity, stop bits, address and the register map
Used byModbus RTU, BACnet MS/TP, DLMS/COSEM and vendor protocolsMeters, PLCs, inverters, drives and controllers

The Modbus serial line guide draws the same split: the Modbus application protocol at layer 7, the serial line rules and RTU or ASCII framing at layer 2, and EIA/TIA-485 or EIA/TIA-232 at layer 1. A datasheet that says "Modbus RS-485" therefore means Modbus RTU frames on an RS-485 pair, and the wiring, the serial settings and the register map all have to match.

Where each setting belongs

Each setting you need to connect a device belongs to one layer, and each layer can fail on its own:

LayerWhat you needExample
PhysicalInterface, wiring mode and terminal namesRS-485, two-wire, terminals D+ and D− plus common
Serial settings and protocolProtocol, baud rate, parity, stop bits, addressModbus RTU, 9,600 baud, even parity, 1 stop bit, address 12
ApplicationRegisters and data formatTotal kWh at input register 0x0156, 32-bit float, high word first

Two products with RS-485 terminals cannot exchange data if one speaks Modbus RTU and the other speaks BACnet MS/TP. Two Modbus RTU devices can match on wiring and settings and still disagree on the registers, because each manufacturer defines its own register map. The Modbus address converter turns a map reference such as input register 30343 into the zero-based address the request carries.

What RS-485 defines: the physical layer

RS-485 (TIA/EIA-485-A) is a differential interface. Each signal travels on a pair of wires, and the receiver reads the difference between them. Noise from nearby cables adds to both wires equally, so the difference survives. The Texas Instruments overview (SLLA070) and unit-load note (SLLA166) give the limits that matter on site.

A driver must put at least 1.5 V between the two wires into 54 Ω, the load of a bus terminated at both ends. A receiver must read a difference of 200 mV or more correctly while each wire sits anywhere from −7 V to +12 V relative to its own ground. That common-mode range is what lets devices with different local earths share a bus. It only holds if the devices share a reference, which is why the Modbus serial guide includes a common conductor alongside the pair.

The load limit is 32 unit loads, not 32 devices. One unit load is about 12 kΩ. Many current transceivers are rated at 1/4 or 1/8 unit load, which allows 128 or 256 of them on one bus without a repeater. The Modbus serial guide still states 32 devices without a repeater, and the addresses stop at 247. On a metering bus the polling time usually runs out first.

Cable length falls as the data rate rises. TI's rule of thumb is that length in metres times data rate in bit/s should stay below 10⁸. A 500 m run can carry up to 200 kbit/s. A 1,200 m run at 19,200 baud gives about 2.3 × 10⁷, far below the limit, so at meter baud rates cable loss sets the length instead. TI gives about 1,200 m as the recommended maximum. The Modbus serial guide gives 1,000 m at 9,600 baud on AWG26 or thicker cable, halved if four-wire cable is used as two-wire, with stubs no longer than 20 m.

RS-485 runs half-duplex on one pair (two-wire) or full-duplex on two pairs (four-wire). It says nothing about the characters, the messages or the addresses. It also does not define the terminal letters. The Modbus guide names the conductors D0 and D1, but manufacturers label them A/B in both orders, or D+/D−, 485+/485− or TX+/TX−. Use the signal definition in each manual, not the printed letter. In the Modbus guide, D1 is the line that is more positive when the bus is idle, so a multimeter across the pair of an idle, biased bus shows which terminal is which. A swapped pair is one of the most common reasons a new bus gets no reply. The RS-485 wiring guide covers the cable, polarity, the common conductor, the 120 Ω termination at each end of the trunk and the bias that holds the idle bus in a known state, and the RS-485 termination and bias checker shows where the resistors go on a given bus.

What Modbus defines: the protocol

The Modbus application protocol defines function codes (for example 03, read holding registers, and 04, read input registers), the data model of coils and registers, and exception responses. It runs over several transports:

VariantTransportFraming
Modbus RTUSerial line, usually RS-485Binary, with a 16-bit CRC
Modbus ASCIISerial lineHexadecimal characters, with an LRC
Modbus TCPTCP/IP over Ethernet, port 502A 7-byte MBAP header, no CRC

The Modbus serial guide adds the rules for RTU on a serial line. One master sends every request. Devices use addresses 1 to 247, and address 0 is a broadcast write that no device answers. Every character is 11 bits: a start bit, 8 data bits, a parity bit and a stop bit. Even parity is the required default. With no parity, the guide requires 2 stop bits to keep the 11 bits. Every device on the bus must use the same baud rate, parity and stop bits. A parity mismatch usually shows as no response or intermittent CRC errors, not as wrong values.

RTU has no start or end character. A frame ends when the line stays silent for 3.5 character times, and a gap of more than 1.5 character times inside a frame makes the receiver discard it. At 9,600 baud one character takes 1.15 ms, so the silent interval is about 4.0 ms. Above 19,200 baud the guide recommends fixed values of 1.75 ms and 750 µs instead. The Modbus RTU timing calculator works these out for any setting, and the Modbus TCP vs RTU guide compares the serial and network variants.

RS-232 vs RS-485

RS-232 is the older serial interface of PC COM ports and some meter configuration ports. The table compares it with RS-422 and RS-485:

RS-232RS-422RS-485
SignalSingle-ended, against groundDifferentialDifferential
DevicesOne transmitter, one receiverOne transmitter, up to 10 receiversUp to 32 unit loads, any of them may transmit
Cable length (TI guidance)About 20 m, set by a 2,500 pF load limitUp to 1,200 m at low data ratesUp to 1,200 m at low data rates
Typical useA laptop to one deviceOne-way links over distanceMulti-drop buses of meters and controllers

An RS-232 receiver switches at ±3 V relative to its own ground. A ground difference between two panels, or noise induced on the one signal wire, adds directly to that signal. An RS-485 receiver measures only the difference between two wires, which the same noise shifts equally. Use RS-485 for any link with more than one device, any cable longer than about 15 m to 20 m, or any cable that runs near power wiring. An RS-232 port on a meter is usually for configuration on the bench, not for a permanent network. The Modbus serial guide allows Modbus RTU on RS-232 for such a link between two devices, with the same frames and serial settings as on RS-485.

An RS-232 to RS-485 converter changes the electrical signal only. Both sides must still use the same protocol and serial settings. The converter also has to switch its RS-485 driver off in time for the reply. A converter that does this automatically is easier to set up than one controlled by the RTS line from software.

Other protocols on RS-485

RS-485 carries many protocols besides Modbus RTU. Modbus RTU is the usual protocol on submeters, power meters and plant controllers. In buildings and energy metering you will also meet these:

ProtocolWhere you find it
BACnet MS/TPHVAC controllers (see the BACnet/IP vs MS/TP guide)
DLMS/COSEMSome utility meters, though more of them expose it on an optical port (IEC 62056-21)
Vendor protocolsDrives, inverters and older meters

M-Bus is sometimes confused with these. It is a separate two-wire bus with its own physical layer (EN 13757-2), and it reaches an RS-485 or RS-232 port only through a level converter. The BACnet vs Modbus guide compares the building protocols.

One bus, one master

A Modbus RTU bus has one master that sends every request. The devices answer only when addressed. If a BMS already polls the meters on a bus, you cannot add a second master to the same pair. The two masters transmit over each other, and both see timeouts and CRC errors that come and go with their polling cycles. Choose one of these options:

  • read the data from the existing master, over its own network interface;
  • use a meter with a second communication port;
  • replace the bus master with one that serves both systems, for example through a Modbus TCP gateway.

A TCP gateway can accept several network clients, but it still sends one request at a time on the serial side. Each client adds to the polling cycle of the one bus. The protocol gateway guide explains the difference between a bridge and a translating gateway, and the commissioning guide works through a polling-time estimate for ten meters.

What to ask for before you connect

Collect this for every device before site work starts:

  • the physical interface, two-wire or four-wire, and the terminal names with their signal definitions;
  • the protocol, baud rate, parity, stop bits and the address;
  • the unit load of the transceiver, and whether the device has termination or bias, and whether it is switchable;
  • the register map for the exact model and firmware;
  • which system is the master today, if the device is already connected.

The Modbus register map guide covers the application layer. For a Modbus RTU meter that is far from the Gateway, a ZMB Modbus interface reads it on a short local bus and sends the registers over the Zigbee mesh to a Gateway running Edge.

Common questions

Is Modbus the same as RS-485?

No. RS-485 is the physical layer: an electrical standard for the signal on a twisted pair. Modbus is a protocol for the requests, the device addresses and the registers. Modbus RTU often runs on RS-485, but Modbus TCP needs no RS-485 at all, and RS-485 also carries BACnet MS/TP, DLMS/COSEM and vendor protocols.

What is the difference between Modbus RTU and RS-485?

They describe one connection at two layers. Modbus RTU is the protocol and its framing: binary messages with a device address, a function code and a 16-bit CRC. RS-485 is the pair of wires and the voltages that carry those messages. A datasheet that says "Modbus RS-485" means Modbus RTU on an RS-485 port. Modbus RTU can also run on RS-232.

What is the difference between RS-232 and RS-485?

RS-232 uses one signal wire per direction, measured against ground, and connects two devices. Its cable is limited by a 2,500 pF capacitive load, about 20 m. RS-485 uses a differential pair, connects up to 32 unit loads on one bus, and works up to about 1,200 m at the baud rates meters use. Its receiver needs only 200 mV between the two wires, and a ground offset between devices of up to −7 V to +12 V does not corrupt the data.

Can Modbus run over RS-232?

Yes. The Modbus serial line guide allows RS-232 as an option for a link between two devices, often a configuration port. The frames, the character format and the one-master rule are the same as on RS-485. RS-232's 2,500 pF load limit keeps the cable to about 20 m, so use RS-485 for more than one device or a longer run.

Can I connect an RS-232 device to an RS-485 bus?

Only through a converter, because the electrical signals are different. The converter must also switch its RS-485 driver between transmit and receive. Converters that switch automatically are simpler to set up than ones controlled by the RTS line, which can release the bus too early or too late for a reply.

What is Modbus RTU over RS-485?

Modbus RTU messages, in binary with a 16-bit CRC, sent as 11-bit serial characters over an RS-485 pair. One master polls the devices in turn by their address, from 1 to 247. Address 0 is a broadcast that no device answers.

What voltage does RS-485 use?

RS-485 has no fixed signal voltage such as 5 V or 12 V, because the receiver reads the difference between the two wires. A driver must put at least 1.5 V across the 54 Ω load of a terminated bus, a receiver must read a difference of 200 mV correctly, and each wire may sit anywhere from −7 V to +12 V relative to the receiver's ground. Modbus itself defines no voltage.