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 total number of Modbus RTU slave devices operating on the wired and wireless networks is 247. This limit, established by the Modbus RTU specification, is maintained even when operating wirelessly, to ensure transparency when including wireless network segments in an existing wired network. The limitation of the Modbus RTU protocol to operate with a single master is overcome by the Gateway, which allows 2 wired masters to be connected, one on each interface of the device. The Gateway controls the simultaneous operation of the 2 masters, alternating communication traffic with the slaves.
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).
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).