All topics
On this page

The gateway is the master on its RS485 bus. It asks the Modbus devices for their values in turn, and only the Modbus device with the requested address answers. You connect the power supply and the network as described in Connect the gateway. Why RS485 works this way is explained in the course lesson RS485 explained.

What you need

  • Shielded cable with one twisted pair and a third wire, for example cable with two twisted pairs.
  • A 120 Ω termination resistor for each end of the bus that has no built-in termination resistor.
  • The manual of each Modbus device, for the terminals, the address and the bus setting.
  • A multimeter to measure the termination.

Connect the wires to the gateway

The first Modbus device connects with three wires to the RS485 connector of the gateway. The connector has six contacts in two rows of three, with markings above and below. The table shows which terminal of the Modbus device belongs on which contact.

Contact on the gatewayPositionTerminal on the Modbus device
D+Top row, left+, D+ or D1
⏚Top row, middleGND, COM, 0 or Common
D-Bottom row, left-, D- or D0
⏚Bottom row, middleGND, COM, 0 or Common
No markingRight columnDo not connect

Both ⏚ contacts are signal ground, so one wire is enough. If the terminals on the Modbus device are called A and B, which one is the plus differs per brand. Look it up in the manual. If it is not there, connect A to D+ and B to D-.

  1. Connect plus

    Connect D+ of the gateway to the plus terminal of the Modbus device. Use one wire of the twisted pair.

  2. Connect minus

    Connect D- to the minus terminal, using the other wire of the same pair.

  3. Connect signal ground

    Connect one ⏚ contact to the ground terminal of the Modbus device, using the third wire.

The third wire keeps the gateway and the Modbus devices at the same reference voltage. Without it, 30 to 50% of the answers came in with a CRC error in practice. The shield of the cable does not count as signal ground.

Daisy-chain the Modbus devices

The bus runs as one line from Modbus device to Modbus device. A star or a long branch reflects part of the signal. A short loop-through on the terminals of a Modbus device is fine.

  1. Run the next cable

    Run a cable from the terminals of the first Modbus device to the next one.

  2. Connect the wires through

    Connect plus to plus, minus to minus and ground to ground.

  3. Complete the line

    Repeat the previous two steps up to and including the last Modbus device.

  4. Connect the shield through

    At each Modbus device, connect the shield of the incoming and the outgoing cable.

  5. Earth the shield

    Earth the shield at one point only, preferably at the gateway.

A shield that is earthed at both ends creates an earth loop that puts interference on the bus.

Fit the termination resistors

A 120 Ω termination resistor goes between plus and minus at each of the two ends of the bus. It stops the signal reflecting at the end of the cable. There are none in between.

GatewayD+D-Signal groundModbus device 1+−Modbusdevice 2 (last)+−120 Ω120 ΩStart of the busEnd of the bus
Plus to plus, minus to minus, ground to ground, and a termination resistor at each end. Here the gateway is at the start.
  1. Terminate the start

    Fit a 120 Ω resistor between plus and minus at the first end. If that is the gateway, fit it between D+ and D-.

  2. Terminate the end

    At the last Modbus device, turn on the built-in termination resistor, using the switch or jumper from the manual. If it has none, fit a separate 120 Ω resistor between the plus and minus terminals.

  3. Turn off the resistors in between

    Turn off the built-in termination resistor on each Modbus device in between.

Set the addresses and bus setting

Each Modbus device gets its own slave address from 1 to 247 and the same bus setting as the gateway. One bus holds up to 32 Modbus devices. Two Modbus devices with the same address answer at the same time, and then neither gives a usable answer.

  1. Set the address

    On each Modbus device, set a slave address that is not yet on the bus. Modbus devices of the same type leave the factory with the same address.

  2. Note the address

    Write the address on the Modbus device. You enter it in the portal later.

  3. Match the bus setting

    Set baud rate, parity, stop bits and data bits equal to the gateway, by default 9600 8N1. Do this for Modbus devices that were already on the bus as well.

If the whole bus needs a different setting, change the gateway in Gateway settings under Modbus RTU-bus (Modbus RTU bus). An owner, admin or technician can do this, as described in Gateway settings. You enter the slave address when you add the device, as described in Set the address and connection of a Modbus device.

The gateway must be the only master on the bus. If a building management system or PLC already reads the same bus, the requests of the two masters collide. If both systems must read the same Modbus device, that is only possible over Modbus TCP, when the Modbus device has a network connection.

Check the bus

The multimeter shows whether the termination is correct. The portal shows which Modbus device answers.

  1. Switch off the power

    Switch off the power to the gateway and all Modbus devices.

  2. Measure the resistance

    Measure the resistance between D+ and D- on the gateway. Around 60 Ω is correct. Around 120 Ω means a termination resistor is missing, and around 40 Ω or lower means there are too many.

  3. Switch on the power

    Switch the gateway and the Modbus devices back on.

  4. Add the Modbus devices

    Add the Modbus devices as described in Add Modbus devices.

  5. Check the status

    On the gateway page, look under Modbus devices. A Modbus device that answers shows Responding.

Swap plus and minus

If the card of a Modbus device still shows No data received yet after the polling interval, plus and minus are often reversed. Swapping them does no harm. If no Modbus device answers, swap D+ and D- on the gateway. If one does not answer, swap plus and minus on that Modbus device.

If the Modbus device still does not answer, see Modbus device shows no values. If answers drop out now and then, see Answers on RS485 drop out or are garbled.

Updated on 7 October 2026

Still stuck?

Email or call us. Include the serial number of the gateway, so we can take a look straight away.

Go to support