Skip to main content
Creating a Modbus network
Dan Allen avatar
Written by Dan Allen
Updated over 11 months ago

This article describes how to connect various Modbus devices together. Modbus has a long history, having been created by Schneider Electric back in the late '70s. To read about the protocol and the history of Modbus please consult http://modbus.org

Electrical connections

The Aquicore devices support an RS-485 (EIA-485 or TIA-485) interface which is a two or three-wire electrical serial interface. RS-485 provides a differential pair with an optional (but recommended ground reference). The pins on the Aquicore devices are marked A+, B- and SH.

  • A+ is the positive signal; a 1 is high and a 0 low

  • B- is the inverted signal; a 1 is low and a 0 high

  • When connecting multiple devices together the positive signals should be connected together and the negative signals connected together (sometimes the A and B are swapped).

  • The shield (SH) provides common-mode immunity, which is essential when the wires become long. The shield provides a reference between the various devices to measure the A/B signals against. All the shields should be connected together.

RS-485 allows for multi-drop connectivity supporting multiple devices along a network. It is important that the devices be daisy chained along the network:

RS-485 introduces a concept of a unit load. A unit load is defined by how it 'loads' the bus on the RS-485 network (essentially the impedance of the transceiver). Transceivers should be designed to support a minimum of 32 loads (i.e. 32 devices along the wires).

For multi-drop to work only one device can transmit at a time. RS-485 does not imply any protocol so all devices when not transmitting should offer a high impedance to the network.

Due to the potentially high number of devices on the network and long wires separating the devices termination may be necessary. Termination is applied to the first and last device of a network. For installations where termination is required a 120 ohm resistor should be connected across the A/B terminals.

The need for termination increases with network length and baud rate. The higher the baud rate the shorter the network and the more likely termination will be required. Without termination signals will suffer from reflection potentially causing data errors. However the reflected signals will dampen and reduce over time. Thus bit time (inverse of baud rate) and network length dictate when termination would be necessary. For baud rates of 9600 (default in Aquicore devices) networks shorter than 2,000 ft should not need termination (at 19,200 network length would be capped at 1,000 ft).

Modbus RTU

Having created a multi-drop electrical network we need a method to inform devices when it is safe to transmit. Aquicore device support Modbus RTU. Modbus RTU employs a master/slave methodology of managing the network. The master device initiates all communication, slaves respond after they have been addressed.

The first byte of any transaction initiated by the master device is the address of the slave who should respond. The Modbus address space is limited to 0-247. 0 is the broadcast address so all slave devices should have an address between 1 and 247. Addresses 248 to 255 are reserved. All slave devices must have a unique address.

For the purposes of connectivity the slave address(es) and baud rate are all that is necessary for the master to interface with the slave. The specific details of the registers supported are required for the device to be fully supported by Aquicore but those details are outside the scope of this document.

Did this answer your question?