en
cz

Gateway for wireless Modbus

At renovations, but also at new sites, we may face a situation when there is need to bring a bus with I/O modules or a power meter from a remote location to a PLC switchboard, but it is not possible to build a classic cable or optical route. Typically, this is a transformer station with a premises foot meter that is several hundred metres away from the main building and so far not connected to it in any way.

If there is direct visibility between the two locations, a wireless link can be used. Nowadays, the 2.4 GHz license-free band (called ISM - Industry, Science, Medical) is usually used. There are general transmitters (protocol independent), but also special devices that work with a specific communication protocol, e.g. Modbus. These have the advantage that many parameters are fixed and optimized for a specific type of serial communication, which greatly simplifies configuration and commissioning. So where we need to connect two or more sites with Modbus RTU / RS485 devices, the Kymasgard range by S+S Regeltechnik can be used.

The range includes both temperature, humidity and pressure sensors with wireless Modbus protocol, and gateways that convert a conventional Modbus RTU server - for example, an electricity meter or photovoltaic inverter - to wireless Modbus. All components use the LumenRadio solution - OEM modules W-Modbus (for connecting one Modbus server) and W-Modbus PRO (for connecting up to 16 Modbus servers). These modules are based on the MiraOS and MiraMesh standards, which provide wireless transmission over the link layer and include features for device assignment, addressing, and 128 bit AES transmission security.

If there is not only a point-to-point connection to be dealt with, but a network of multiple wireless devices, it's good to know that wireless elements use a mesh topology - meaning that there may not be direct visibility between the client and each server. All that is required is that there is a wireless path between two communicating elements that has a length of maximum of 8 "hops", i.e. routes from one device to the other. The packets are then automatically routed and the entire network appears as one logical unit.

Thanks to frequency hopping, the transmission is highly reliable and resistant to interference even in industrial environments. The devices are IP65 rated so they can be installed outdoors. The signal range is about 500 m in line-of-sight and 50-70 m in buildings. However, it is necessary to pay attention to the material of the walls and their effective thickness - for example, if two devices are placed diagonally below each other on different floors, a layer of reinforced concrete can be up to several meters thick in the signal path, which practically means a breakdown of communication. However, the more sensors or gateways there are in the system, the more mesh technology applies and it is likely that "some" nodes in the network will always see each other, thus creating a transmission path.

For wireless sensors, only the link (Modbus) address is set. The gateway is completely transparent to the Modbus protocol, it is only necessary to set the physical transmission parameters of the RS485 interface (baudrate, number of data bits, parity, number of stop bits) and, if necessary, activate the bus termination. On the wireless side, all devices must be logically connected, or paired. We will use this term even if there are more than two devices in the wireless network. Pairing is very simple and does not require any additional tools such as converters, computer, software, etc. Basically, it works by setting one of the devices as the master (Gateway, Master) and switching to pairing mode. The other devices (Node), if they are subsequently also switched to pairing mode, will automatically find the Gateway and connect to it. This process takes 1 to 2 minutes. After pairing, the Node must be locked by toggling the DIP switch and thus the binding is permanently fixed. Device states and process progress are indicated by color LEDs on the devices. Always allow a few minutes for network initialization after the power supply is connected, when the devices search for each other and configure the optimal signal paths themselves - during this time the Modbus communication is not functional.

For advanced settings and other diagnostic functions, the Lumenradio W-Modbus mobile app is available which connects to the device via Bluetooth. Bluetooth communication must be activated on the device by pressing the pairing button for three seconds. Once connected, the following functions can be performed via the app:

  • update the firmware of the wireless part
  • error detection (duplicate addresses on Modbus, communication errors, etc.)
  • individual naming of the devices - checking network settings
  • documentation of the network settings as a .pdf file.

Topology example:

Modbus Master: PLC, SCADA, etc. acting as Modbus RTU / RS485 master
W-Modbus Gateway: interface between Modbus / RS485 and W-Modbus on the master side
Modbus Slave: meter, thermostat, PV inverter, I/O module etc. with a Modbus RTU / RS485 interface
W-Modbus Gateway (Node): interface between W-Modbus a RS485 on the slave side, for one slave
W-Modbus Gateway (Node Pro): interface between W-Modbus a RS485 on the slave side, for maximum 16 slaves
W-Modbus Slave: sensor with a W-Modbus interface, integrable directly in the wireless network.

In addition to sensors, there are two types of gateways in the range: the W-Modbus Gateway and the W-Modbus Gateway Pro. Each gateway can be configured by the switch either as a "gateway" (connected to the RS485 Modbus master) or as a "node", or adapter on the Modbus slave side of the device. All devices form a single logical Modbus line, the line addresses on the line must be unique. The W-Modbus Gateway (in Node mode) is used to connect a single Modbus slave device, while the W-Modbus Gateway Pro (in Node mode) can handle up to 16 of them. On the Modbus master side of the device, just use the W-Modbus Gateway, no matter how many RS485 slave devices are on the same link or how many other Node mode gateways (or W-Modbus slave sensors) are in the system.

The W-Modbus Slave devices work as standalone wireless temperature, humidity or pressure sensors, and it is not possible to connect other devices over RS485 to them.

The simplest topology - connecting one remote Modbus RTU slave - looks like this:

This means that only two W-Modbus Gateway devices are required, one of them in Node mode.

If there are more Modbus slave devices on the remote side, we need to deploy the Gateway Pro:

It must be taken into account that inserting a wireless path between the RS485 Modbus master and slave means a telegram delay of about 60 - 70 ms. The serial communication dump - port monitor will show this quite clearly:

Wired connection only – response of 31 ms (given by the slave device processing time)

11:50:14:142 => 01 03 00 00 00 01 84 0A
11:50:14:173 <= 01 03 02 03 28 B8 AA
11:50:14:690 => 01 03 00 0A 00 01 A4 08
11:50:14:722 <= 01 03 02 0F 28 BD AA

Connection with inserted wireless path (1 hop) – response of 95 ms

11:45:46:340 => 01 03 00 14 00 01 C4 0E
11:45:46:435 <= 01 03 02 09 B9 7F A6
11:45:46:951 => 01 03 00 00 00 01 84 0A
11:45:47:046 <= 01 03 02 03 28 B8 AA

If the communication tends to drop out or even be completely non-functional, it will be necessary to set a longer timeout time in the Modbus master settings.

Finally, let’s compare the pros and cons of a point-to-point W-Modbus solution with a typical conventional solution using a wireless WiFi link and a Modbus RTU/TCP router:

  Kymasgard W-Modbus WiFi link + Modbus TCP router
Costs From € 480 From € 600
Possibility to transfer other protocols over the same link No Yes (PLC programming, CCTV…)
Security Link layer, 128 bit AES May be higher, depending on the technology used
Commissioning Easy – no tools required Must be configured as a network device
Topology Flexible, see above Basically point-to-point, more complex must be solved in the application (more Modbus TCP servers)
Installation Easy even outdoors, IP65 Need to use an installation box or an external antenna etc.
Range (direct visibility) Up to 500 m With directional antennas even higher, up to 1 km

Apparently the W-Modbus solution is making sense where a simple topology shall be kept or where we need to interconnect several remote devices or small groups of devices and it is not worth installing a system of WiFi connections and Modbus TCP/RTU routers. Compared to similar devices on the market, Kymasgard W-Modbus is characterized by its easy setup and commissioning, mesh topology (which facilitates deployment in situations without direct visibility between all nodes to each other) and the availability of sensors with already integrated W-Modbus interface. Thus, it can be said that where we need to connect a single remote site that contains a large number of Modbus RS485 devices (a substation with meters) and where we might need other network services such as IP cameras, a separate conventional wireless link on WiFi technology can be considered. On the other hand,

  • for simple point-to-point connections with a single Modbus slave, but also
  • for larger networks with multiple remote sensors (where a separate wireless link would have to be installed for each sensor or meter, or
  • for systems where the Modbus master has no other option than Modbus RTU / RS485 (i.e. Modbus TCP cannot be used)

the Kymasgard W-Modbus is a perfect choice. The complete overview of all W-Modbus devices is here: https://www.spluss.de/en/modbus-wmodbus/wmodbus/