Control box with a CGate-06, four power meters and a temperature/humidity sensor, RS-485 cable routed in the wiring duct
TECHNICAL NOTE

How to Wire RS-485: Topology, Termination and a Worked Example

One twisted pair links meters, sensors and an alarm output. Using a server room as the example, see how to run a daisy chain and where the termination resistors go.

Published Updated
RS-232 / 422 / 485

RS-232, RS-422 and RS-485 compared

All three are electrical standards for serial communication. They differ in how the signal travels, how many devices one line can take, and how far it can run.

RS-232RS-422RS-485
SignalingSingle-ended (to ground)DifferentialDifferential
TopologyPoint-to-pointOne driver, many receiversMulti-drop bus
DevicesOne-to-one1 driver, 10 receiversUp to 256
Distance (approx.)15 m1,200 m1,200 m
WIRING

Wiring: daisy chain, polarity, termination

Switch the options below to see which wiring gets data through. The server room has 4 power meters and 1 temperature/humidity sensor, all on the same RS-485 line.

Topology
D+ / D−
Data flow
D+D−RequestReplyUnreadable device

CGate polls Meter 1

CGateMeter 1Meter 2Meter 3Meter 4Temp/RH sensorCGateMeter 1Meter 2Meter 3Meter 4Temp/RH sensor

Data comes through

The cable leaves CGate, lands on each device’s terminals and continues to the next; the last device is the end of the line. With D+ to D+ and D− to D−, CGate polls each device in turn and every one replies.

Termination: only at the two ends of the line

Termination resistors go only at the two ends of the line; the devices in between get none. CGate is at the head, so switch on its built-in termination. If the last device at the far end has none built in, fit an external 120Ω resistor across its D+ and D− terminals (matching the cable’s characteristic impedance).

Note: isolation

For runs between buildings, long distances, or where the two ends sit at different ground potentials, choose isolated devices: the RIO LLD-Modbus32E-01 and LLD-ModbusIO-01 series. In the CGate series, only CGate-05 is currently isolated; the other models have surge protection.

CGate built-in termination and bias

ModelBuilt-in terminationBias (pull-up/pull-down)
CGate-06120Ω / 600Ω1KΩ / 10KΩ
CGate-05120Ω / 600Ω1KΩ / 10KΩ
CGate-03120Ω—
CGate-02120Ω—
CGate-01120Ω—
Technician at a control box using a laptop to set the serial parameters of meters and sensors
LIMITS

Matching settings, unique IDs, device limits

Once the wiring is right, check the serial settings and the device count. Go through these cards before adding a new device.

Match the serial settings

Baud rate, parity and stop bits must be the same on every device on the line.

Common mistake: one device at 9600, another at 19200. The one with the different baud rate never replies.

Serial settings

Different settings, separate line

A device whose settings differ from the others and cannot be changed should not share their line.

Fix: connect it to another RS-485 port on the gateway.

Serial settings

No duplicate slave IDs

Each device has its own Modbus slave ID, and no two on one line may share it. With a duplicate, both devices answer at once and garble each other.

More devices, longer polling

The master asks one device at a time and waits for its reply before asking the next. At 9600 bps one read takes about 0.05–0.1 s, so one round of 30 devices takes 1.5–3 s.

Fix: raise the baud rate, or split the devices across lines.

Polling time

Electrical limit: up to 256 devices

Common transceivers are rated at 1/8 unit load, so in theory one line can take 256 devices. Bias resistors and other loads count too, so the real figure is somewhat lower.

Standard

One master per line

On a Modbus RTU line, only one master sends requests; every other device is a slave.

Fix: if a PLC or HMI already reads the line, do not add a second master.

Protocol rule
EXAMPLE

Example: a server room with 6 nodes on one CGate-06

CGate-06 is the Modbus master. One RS-485 line runs in turn to the temperature/humidity sensor, the 4 meters in the switchboard, and finally the remote controller LLD-ModbusIO-02, whose DO output drives a warning light.

Example server room: RS-485 runs from CGate-06 to the temperature/humidity sensor, the 4 meters in the switchboard, and finally the remote controller LLD-ModbusIO-02, whose DO output drives a warning light
  1. CGate-06Modbus gateway
  2. Temp/RH sensor
  3. Meters 1–4Switchboard
  4. LLD-ModbusIO-02Remote controller
  5. Warning lightDriven by DO
  6. Server racks
RS-485 daisy chainDO control line
6 nodesOne RS-485 port is enough
2nd portFree for devices with different settings
Alarm outputFrom the remote controller (DO or AO)
TROUBLESHOOTING

No data? Check in this order

Work through the groups in order: move on only when the previous one checks out.

Wiring

Start with the physical wiring

  1. The cable is undamaged and the terminals are tight
  2. D+ to D+ and D− to D−, with no device swapped
  3. The devices are daisy-chained, with no long stubs
  4. Termination is at the two ends only, and switched on

Settings

Then the gateway and device settings

  1. The cable is on the port named in the configuration
  2. Baud rate, parity and stop bits match the devices

Communication

Finally, Modbus communication

  1. Slave IDs are unique; addresses and function codes are correctTroubleshooting addresses and function codes →