How to Optimize Modbus Communication

Modbus is one of the most popular industrial protocols in the world. Given the large installed base of these devices and the rapid adoption of Ethernet on the factory floor, there is growing demand to interconnect them. We are going to talk about the advance functions of Modbus Gateways and how it can help to make the bridging serial-based devices and equipment with Ethernet easier and better.

Slave IP Mapping

For applications where there are multiple Modbus slaves on a network with the same Slave ID, virtual IDs can be created to provide access by unique ID. The slave ID map consists of entries (channels) that specify a range of virtual IDs, the destination, and the offset value. The offset value is used to convert the virtual ID to the actual ID.

With the slave ID map, smart routing is achieved for units with multiple serial ports. Since each virtual slave ID is routed to a specific Modbus network, requests are not broadcast over all serial ports. This keeps communication efficient and prevents devices on one port from slowing down the whole system.


Messaging Priority Control

As Modbus networks increase in size and complexity, the lag time between commands and responses becomes a growing concern. Priority control is designed for urgent requests or commands that are sent to Modbus RTU/ASCII slaves. Since RTU/ASCII slaves cannot handle multiple requests, the Modbus gateway must send each request individually and wait for the response before sending the next request. As requests stack up, the response time can suffer. This can cause problems for certain critical requests that require an immediate response.

With priority control, the specified requests are sent to the front of the queue for more immediate response times. It can be specified by:

  • Priority requests can be specified by master (IP address or serial port),
  • TCP port number
  • Command type (slave ID, function code, or data).


Serial Com-port Redirector
For legacy applications that only provide support for Modbus serial connections, it is possible to use a virtual COM-port which redirects data to an Ethernet attached Modbus Gateway.

In some applications, users still want to have the original serial master to connect with the serial slave directly, but also require the serial slave device to connect to the Ethernet via the Modbus gateway. The "Serial Re-director" is used to direct the command from one serial port to another. So the serial slave can be controlled by an existing serial master and TCP master at the same time. It keeps the existing control unchanged and extends the control system to Ethernet.


These Modbus Gateway advanced functions will assist the users to optimize the performance of the Modbus network. Let us know your questions and concerns about Modbus communications.

Optimize your Modbus communication with these products.

Related Articles