Gateway for wireless communication in Modbus RTU networks

1100It is clear that the supply and acceptance of wireless networks in the industrial sector is growing. Aspects such as reliability, security, latency, and determinism are addressed differently by wireless protocols such as Wireless HART, ISA 100.11a, ZigBee, among others. These protocols fall into a larger category called “Wireless Sensor Networks”. There is a large amount of published material and products already available in the wireless sensor network category.  

EIA/TIA-485 (RS485) is the most widespread electrical standard for wired communication networks in industrial manufacturing. In these networks, the Modbus RTU protocol stands out, a simple protocol with a huge range of products all over the world.  

Due to the difficulty to adjust communication times, most converters from wired communication to wireless devices present challenges for applications with the Modbus RTU protocol. Especially in networks that operate products from different manufacturers, it is very difficult to configure converters to ensure that Modbus RTU communication packets are not splitted during the communication process. Splitting can cause communication errors with some network devices, increasing traffic with connection attempts and decreasing performance.  

This article presents solutions to create wireless Modbus RTU networks or subnets that are easily integrated into wired systems based on the same protocol. To provide wireless connectivity, the IEEE 802.15.4 standard, the same used in the vast majority of “Wireless Sensor Network” systems, is adopted. AirGate-Modbus handles features inherent to the Modbus RTU protocol, such as the strict time requirement, the formation and delimitation of packets, the low speed, and the number of slaves and single master, to ensure the correct operation of the Modbus RTU protocol, even when operating wirelessly. 

Creating wireless Modbus RTU networks 

AirGate-Modbus is a Gateway that incorporates Modbus RTU networks over RS485 into one or more IEEE 802.15.4 wireless networks. This integration is transparent to the Modbus network, making it possible to replace long stretches of cabling with wireless segments.  

Each Gateway has 3 communication interfaces: USB, RS485, and IEEE 802.15.4. It is possible to create different arrangements between wired and wireless networks, depending on the configuration of each of these interfaces.  

The IEEE 802.15.4 interface operates in star topology and allows multiple stars to be configured. This helps to solve complex wireless connectivity problems. The Gateway uses the internal mechanisms of the IEEE 802.15.4 standard to ensure the operation of wireless communication even when there is interference from devices operating in the same frequency range. The automatic selection of the communication channel (out of a total of 16) is based on the Energy Detection and Quality of Signal mechanisms, combined with the error rate in wireless Modbus RTU communication. This mechanism automatically switches channels whenever the performance or quality of the wireless network drops. The operating frequency is 2.4 GHz, with a power of 20 dBm (100 mW), resulting in a range of 1000 m in the open and around 100 m inside buildings (the range inside buildings depends on the number and type of obstacles between the wireless devices).  

Maximum number of devices on a RS485 network

The TIA/EIA-485 standard, popularly known as RS485, does not define the maximum number of devices interconnected on a network. It mentions several parameters that can be used to calculate this limit. Some of these parameters are:

  • Lower limit for the resulting load resistance on the bus.
  • Resistance value that each device in the network represents on the bus, called “Unit Load” (15 kΩ).
  • Minimum current value that the driver (transmitter) of an RS485 device must be able to supply.

Based on this data (and considering the need for termination resistors at both ends of the bus), the limit of 32 devices with a unit load can be calculated for an RS485 communication bus. It is recommended to use 120 Ω termination resistors, whose resulting value corresponds to 60 Ω.

RS485 devices are currently available with less than the unit load. The usual values are 1/2, 1/4, and 1/8 of the unit load. To increase the number of devices in a RS485 network to 256, one possible solution is to use only devices with 1/8 of the unit load. Since 2008, NOVUS Automation devices have used 1/8 load drivers.

In many applications, there is also equipment that is not manufactured by NOVUS on the bus. Thus, the theoretical calculation of the maximum number of devices on the RS485 network can be more difficult.

In smaller applications, where the length of the network cables is short and/or the communication speed is low, it may be possible to eliminate the termination resistors. This increases the network’s device capacity from 32 to 282 devices! It is a reliable operation. In this condition, it is not guaranteed.

Finally, for users of the Modbus RTU protocol over the RS485 bus, it should be noted that any increase in the number of physical devices on the RS485 network could run up against the logical limit of Modbus RTU slaves, which is 247.

As a device dedicated to the Modbus RTU protocol, the AirGate Modbus Gateway ensures that Modbus RTU packets are not split. This guarantees that the wireless transmission does not deteriorate. This device also verifies Modbus packets in advance and does not transmit packets containing errors, which minimizes network traffic. 

Typical Modbus Gateway applications for wireless networks 

AirGate-Modbus Gateway devices are useful to eliminate cables in already installed systems and are useful in new projects or extensions of industrial automation systems that require more advanced features, such as multiplexing Modbus masters, multiple wired network segments wirelessly interconnected, and the use of repeaters to extend range. Some of these applications are shown below. 

   1. Including wireless segments in an existing wired network  

In systems where there is already a Modbus RTU network operating on RS485, it is possible to include wireless coverage to communicate with other wired segments. This type of situation often occurs when expanding networks where installing new cables is difficult or undesirable. Including a Gateway at any point in the existing network and other Gateways at any point in the new wired segments will allow full communication to be implemented as a single Modbus RTU network. Figure 1 shows this application. 

   2. Direct connection of the Gateway to the USB port of the SCADA PC  

In computer-based supervision applications, the Gateway can be connected directly to the USB interface of the computer, converting it to RS485 and IEEE 802.15.4. The wired network for communication with the Modbus RTU slaves can start from the RS485 interface of the Gateway. Other Gateways, which are installed within range of the first one, allow wireless communication with other wired networks connected to them, as shown in Figure 2. 

   3. Using the Gateway to multiplex 2 masters in the wireless network  

The Modbus RTU protocol defines that the network can only have 1 master, which creates technical restrictions in many supervisory applications. AirGate-Modbus accepts 2 masters, one on the USB interface (typically a PC) and one on the RS485 interface (typically an HMI or PLC). The communication requests from these 2 masters are controlled by the Gateway and sent to the slaves via the IEEE 802.15.4 interface. The responses received are returned to the correct master. Figure 3 shows this application. 

   4. Use of additional Gateways to extend the reach of wireless networks 

To extend the reach of the wireless networks, it is possible to install additional Gateways, which will form additional wireless subnets, in a tree-like structure, as showed in Figure 4. 

   5. Repeater function with star application 

It is possible to form different wireless network topologies from the new AirGate-Modbus firmware version. By updating the DigiConfig configuration software and AirGate-Modbus via the USB interface, devices that are configured as RS485-SLAVES will automatically adapt to the network requirements. When in this operating mode, the AirGate-Modbus will act as a wireless repeater once it finds the need to extend the wireless network to which it is integrated. It is important to note that this function is enabled instantly whenever the device is configured as RS485-SLAVES.  

As shown in the figure below, which shows an example of how to expand a network, an AirGate-Modbus configured as RS485-SLAVES (Firmware > 1.23) was inserted with the same PAN ID (5670). In another segment, 2 AirGates were connected via their RS485 interfaces, 1 AirGate-Modbus operating in RS485-SLAVES mode and 1 AirGate-Modbus operating in RS485-MASTER mode. In this segment, a PAN ID (5671) was created, starting a new star network. 

The Modbus RTU protocol can benefit from wireless communication technology, although it is necessary to take certain precautions to avoid excessive communication errors. The use of generic converters for Modbus RTU communication over radio frequency can increase the rate of communication errors. It is better to adopt devices that consider the peculiar properties of this protocol during the conversion process.  

The AirGate Modbus device is dedicated to this type of conversion, but it has even greater features, becoming a communication Gateway. This makes it possible to eliminate cables and use complex functions such as multiplexing Modbus masters and structuring multiple networks (wired and non-wired). The application examples shown give a glimpse of the possibilities that wireless technology offers to the widespread and well-established Modbus protocol.  


IEEE Std 802.15.4™-2003, IEEE Standard for Information Technology – Telecommunications and information exchange between systems – Local and metropolitan area networks – Specific Requirements – Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks (LR-WPANs).


Keep reading:

Data logging: How many acquisitions can be stored in a data logger?

5G in IoT products: Necessity or luxury?

5 steps to digitalize the temperature recording process