Tips for Designing Your Systems to Optimize Modbus Devices

How To Architect Your Systems to Get the Most Out of Your Modbus Devices

Chances are, your automation tasks are propelled forward by Modbus. It is safe to assume that this widely embraced industrial communications protocol, with a master-slave structure, will serve as the foundation of networks for a considerable time. Modbus RTU and Modbus TCP, the main formats, excel in serial and Ethernet communications, respectively.

Several factors reinforce Modbus’s position as the leading industrial communications protocol. Modbus RTU, in particular, is simple to set up in field devices and facilitates economical troubleshooting. Modbus TCP, the cousin of Modbus RTU, plays a similar role in Ethernet connections. However, communication issues persist, necessitating a mediating solution. As a result, network engineers are continually seeking the right remedy to ensure seamless communication between serial devices and the SCADA host. This becomes crucial as more serial devices join Ethernet networks.

Besides the compatibility challenge, additional hurdles also accompany the scenario. The abundance of proprietary SCADA software further complicates matters as each program offers varied Modbus driver support capabilities, demanding meticulous selection by system operators based on network requirements. Moreover, the concurrent requests from multiple SCADA hosts to access a single Modbus RTU-supported device add another layer of complexity. Operators must also ensure quick device response times in critical applications.

In this write-up, we will propose solutions to these obstacles, most of which revolve around integrating gateways within your network to maximize the potential of your serial devices.

The Essential Link

The market is replete with SCADA software boasting diverse Modbus driver support capabilities. Thus, it’s imperative to identify the ideal SCADA software for your system in advance. Here, we will briefly discuss some common scenarios.

  1. A SCADA host featuring a Modbus TCP driver: In this scenario, a protocol conversion gateway emerges as the optimal solution. It permits leveraging the Modbus TCP protocol for communication with Modbus RTU-supported devices. Upon receiving the Modbus TCP request, the gateway instantly converts the packet to a Modbus RTU packet and forwards it to the compatible devices.
  2. A SCADA host operating on a Modbus RTU driver—sans a native serial port: If you aim to continue using your existing SCADA program and devices, but your original host lacks a built-in serial port, a serial device server can resolve this by creating a virtual COM port linked to your remote serial devices. This configuration allows seamless access to remote serial devices via the virtual port, mimicking the behavior of a physical COM port. The serial device server establishes the virtual COM port driver on your SCADA host, thus enabling direct Modbus RTU requests to the COM port.

06-01-(5).png

Virtual COM port: Accessing a remote serial device as if the SCADA host has a native COM port.

While serial device servers can integrate Modbus RTU devices into Ethernet networks, a gateway solution proves more versatile for system prerequisites. Your host should support Modbus TCP connections, which are generally well-supported and prevalent. Situations requiring a dedicated gateway solution include:

  1. Multiple masters or redundancy: Ethernet connections offer multiple connection access capabilities, enabling up to 32 SCADA hosts to simultaneously query Modbus RTU-supported devices. Unlike serial device servers, which often do not support multiple masters, gateways can efficiently handle such scenarios.
  2. Simultaneous device access for legacy Modbus RTU HMIs and new Modbus TCP SCADA systems: While Ethernet connections facilitate remote access, you might prefer maintaining local HMI connections. In cases where the serial port is already connected to a gateway, thus rendering it inaccessible for HMI connections, select gateways provide a serial port redirector to overcome this hurdle by transferring requests between different serial ports based on slave ID.

06-02.png
A serial port redirector maintains active local HMI connections alongside new Modbus TCP SCADA systems.

Comprehensive Access

In extensive projects, multiple hosts may monitor a region and serve as redundant hosts for overseeing devices in other areas when necessary. As a result, Modbus RTU-supported devices must connect to several masters to enable simultaneous access. Although a gateway adequately manages this, it’s crucial to note that the serial port bandwidth remains constant. If multiple requests arrive via the same serial port, delays may occur as the gateway processes earlier requests first. This necessitates calculating the appropriate polling time to enable multiple masters to access the same Modbus RTU device concurrently. For instance, if one request takes 100 ms, five simultaneous connections would prompt a waiting duration of at least 400 ms before the next request can be sent. Each SCADA host must allocate 400 ms (plus a buffer) for polling cycle times.

While the above approach is effective, some gateways support an agent mode, continually retrieving data from connected devices and storing it in internal memory for responding to host requests. Although faster and more efficient, this method may not provide the most up-to-date data.

Introducing the Agent

For critical applications requiring swift device responses, an agent gateway becomes essential. This gateway sends individual Modbus commands to each Modbus RTU-supported device to actively fetch data and consolidate it into a single register, subsequently storing it in internal memory. By retrieving data through an Ethernet connection, the host can secure quicker responses. Additionally, all data can be organized into a unified block within the gateway’s memory, facilitating data retrieval from the host with a single Modbus read command.

About Moxa’s Solutions

Moxa stands out as a leading provider of serial-to-Ethernet connectivity solutions. NPort® serial device servers offer multiple operation modes, including Real COM Mode, TCP Client Mode, and UDP Mode, allowing precise control over how serial devices link to networks. Moxa’s MGate™ gateways facilitate protocol conversions between SCADA/PLC systems and devices employing various protocols. Notable features that distinguish MGate™ gateways include straightforward configuration via a user-friendly web console, simplified maintenance with built-in monitoring and diagnostics, and dependable performance. To explore our solutions further, download our brochure.