Cookie
Electronic Team, Inc. uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

How to test Modbus Communication - Modbus Debugging Tool

Olga Weis Olga Weis

Modbus is a communication protocol widely used in industrial automation systems, smart home setups, and automated networks for small objects, such as warehouses and greenhouses. This protocol facilitates the connection of various types of equipment to a home computer. Developing projects like Arduino and Raspberry Pi have significantly boosted interest in robotics and automation tasks. This growing interest, in turn, has contributed to the rise in popularity of Modbus among both hobbyists and professionals.

Contents

  1. Developing and testing Modbus devices
  2. Efficient Modbus testing software
  3. ModBus debugging tool for automation systems

This article will discuss the key features of the available software and hardware solutions for Modbus testing and debugging.

Developing and testing Modbus devices


Experts use specialized software and hardware tools to develop and debug Modbus RTU devices. As for hardware devices, the simplest solution will be an RS485/USB converter. Of all the devices of this type, the most efficient solution is MOXA UPORT 1130/UPORT 1150. The device is designed to be easy to use and requires minimal skills to be assembled. There are also more complex solutions like Ethernet/RS-485 (for example, NPORT from MOXA).

MOXA UPORT 1130/UPORT 1150

In practice, when it comes to the development of Modbus RTU devices, the slave function is implemented more often. Slave devices include various sensors, controlled relays, I/O modules, etc. Master devices are created less often. In automation networks, the master function is usually performed either by a controller, which already has a Modbus stack implemented, or an OPC Server/SCADA system equipped with a Modbus driver.

Efficient software for Modbus testing


Testing can be performed on different levels of Modbus device development. The Modbus test software and hardware solutions differ depending on the stage of development and the purpose of testing.

Modbus test software

During the development process, a situation may arise when a device receives a request and responds to it (this can be either indicated by the packet reception/transmission LEDs, if such elements are provided in the design, or detected by using a debugger and setting a breakpoint) but the data is not displayed in the terminal or another specialized program. In this case, you will need a dedicated serial port sniffer.

Serial Port Monitor is one of the best Modbus testing software available today. This Modbus solution can easily read and record any serial data going through the system's COM ports. The advanced functionality of the app allows capturing data in real time so that a developer can resolve all problems once they have been detected.

This Modbus testing tool can work in the terminal mode that emulates transferring data from a monitored COM port to a device inserted into it. This option is especially convenient for the Modbus communication test, as it allows observing the reaction of a particular device to a specific command and data.

Here’s what our customer says:

“I used this software and found it to be incredibly user-friendly. It met all my expectations. As an electronics engineer, I used the software to analyze and communicate with my domestic devices, such as my VMC. I am planning to create a display and control module using this application. Additionally, I used it at work on industrial equipment. As a maintenance technician for radioactivity detection and monitoring equipment in nuclear power plants developed by the MIRION company, we use a Serial Port Monitor Modbus data testing.”
— AMBROSINI Frédéric

The dedicated software comes in handy when it’s required to not only check whether a device works (that is, correctly respond to requests) but also measure the meantime to failure.

Modbus tester solution allows logging the incoming and outgoing data streams. In addition, all collected data can be shown in different views (table, line, dump, terminal), which makes it simple to compare and analyze it.

Modbus testing software
14-day free trial

Debugging of automation systems based on Modbus devices


There are far more specialists who debug automation systems and devices supporting Modbus protocol than those who develop these devices. So, based on the specifics of tasks, the requirements for Modbus software will be slightly different.

If it is needed to connect a controller to a single slave device, you can establish a serial communication by using an RS-485/USB converter, a PC, and specialized software or terminal. In this case, there’s no need for long testing followed by the analysis of numerous log files. So, the logic of the operation and the set of tools will not differ from those used at the testing stage of slave device development.

In case you already have a ready network of devices, the following tasks may be distinguished:

  • checking the operability of all devices on the network (i.e. communication with each separate device and verification of the correctness of its response);
  • load testing (identification of the device’s maximum operating capacity). It is recommended to do several sessions and analyze the collected data for failures, non-responses, data corruption, etc.

To accomplish these tasks, you’ll need either a terminal with the ability to create a list of requests or a specialized tool such as Modbus Poll, a Modbus master simulator that allows monitoring several Modbus slaves and/or data areas at the same time.

Modbus communication challenges

Some Modbus devices can have particular RS-485 interface settings (the number of data bits, parity, and the number of stop bits). Devices with different settings cannot work in the same network with the same master. The most convenient tool for testing and configuring such devices is a terminal program that supports a quick switch between pre-installed port parameters or works with several lines simultaneously.

Another challenge is providing data exchange with a device working over a protocol different from the standard specification of Modbus RTU. For instance, the slave's protocol may be logically similar to Modbus (package structure, timeouts, etc.) but use some functions beyond the standard.

In this case, it will be a good idea to use either Modbus Poll, which allows formulating arbitrary requests, or a terminal that supports similar functionality.

small logo Serial Port Monitor
#1 at Serial Port Software
Serial Port Monitor
Log and analyze serial port activity
4.8 rank based on 345+ reviews
Get a download link for your desktop
Submit your email address to get a link for quick download on your desktop and get started!
or