Modbus Decoder:
How to Decode
Modbus Protocol

Table of contents:

  1. Using COM Port Monitor to decode Modbus data.
  2. Understanding and decoding the Modbus message format.
  3. Additional features of Serial Port Monitor.

The Modbus communication protocol is a means by which serial devices or applications can communicate through a network. It is an open protocol and can be incorporated into any device royalty-free. This made it very popular with serial device manufacturers and it has become a standard communication protocol in the industrial and manufacturing sectors.

There are two main transmission modes of Modbus. They are Modbus RTU (remote terminal unit) and Modbus ASCII. The RTU variation is more efficient whereas Modbus ASCII produces messages that are more readily understood by human readers.

Decoding these messages is the key to debugging issues with your Modbus network or the devices that are attached to it.

Serial Port Monitor is an innovative software Modbus protocol analyzer developed by Eltima Software that can be used to decode Modbus protocol messages in both the RTU and ASCII format.
Serial Port Monitor logo

Serial Port Monitor

Log and analyze serial port activity
4.8 Rank based on 41+ users, Reviews(75)
Download 14-day fully-functional trial period
Serial Port Monitor

The process of decoding converts the format that the serial devices use to communicate directly into meaningful messages to the human caretakers of the systems in question. Using a Modbus message decoder allows you to understand the messages moving through the Modbus network which can be instrumental in diagnosing problems and increasing efficiency.

When issues arise in a Modbus network implementation, the ability to decode the Modbus messages is imperative in addressing the situation in the correct manner. This is where a quality Modbus frame decoder like Serial Port Monitor can make the difference in allowing quick and precise identification of the problem that is impacting your network or devices.

1. Using Serial Port Monitor to Decode
Modbus Data.

When you need to decode Modbus data, Serial Port Monitor is an indispensable tool that can aid developers or network administrators troubleshoot their networks. It is available as a free Modbus decoder download so you can see how the product can help in your Modbus installation.

How to decode Modbus: step-by-step instruction

Here are instructions on how to decode Modbus messages using this excellent software tool.

  1. First, you need to start a new monitoring session by launching Serial Port Monitor.

  2. Select “Session -> New session” from the main menu. Alternately you can choose “New” on the main toolbar or use the CTRL+N keyboard shortcut. New session

  3. The “New monitoring session” screen will be displayed where you can choose the serial port or ports that you wish to monitor. New monitoring session

  4. Choose your desired visualizers from among Table, Line, Dump or Terminal View. If you are using the tool as a Modbus RTU decoder, select Modbus and RTU. Modbus ASCII is also available if that is the protocol you are using.

  5. New session options can be checked to “Start monitoring now” and to “Start in new window”.

  6. Select your Capture options to choose which events to capture – Create/Close, Read/Write or Device Control.

  7. Click on the “Start monitoring” button after you have made all of your selections. You will see the data in all of the formats you have chosen in the monitoring window.
Start monitoring

The customizing process of monitoring data

Modbus Analyzer enables you to further customize the way your monitored data is presented by modifying your session preferences. In order to access the configuration dialog, you select “Session -> Preferences” or use the shortcut CTRL+P. Here are the ways you can tailor the data view that your monitoring session displays.

Table of preferences

Customize the way each visualizer is displayed by expanding the “Windows” option in the left window panel. You can choose to display your data in different colors and control which columns are displayed when you are in Table View.

Table View

Customize the timestamp format to display the actual date and time or time intervals from the start of the session or since the last record was sent. This control makes it easier to see the records in a way the way that makes the most sense for your monitoring situation.

Timestamp format

The representation of transmitted data can be customized by modifying the string length and scale of notation.

String length

The customizable send dialog lets you send text strings with or without their hexadecimal equivalents. You can also create aliases here to increase the transmission speed.

Send dialog Create aliases

2. Understanding and Decoding the
Modbus Message Format.

The Modbus protocol was designed to be used with serial devices and applications. At its most basic level, Modbus communication is binary and is conducted by sending a series of bits signifying zeroes and ones via voltages. A positive voltage indicates zero and a negative voltage is a one. The binary data transmission is converted into hexadecimal with each block of 4 bits representing a Hex digit 0 through F.

Modbus protocol

Messages are the way that the Master and Slave devices in a Modbus network communicate with each other. Using a Modbus packet decoder lets us investigate these messages to understand what the devices are saying to each other and determine why network or interface problems are occurring.

The Modbus messages travel between Master and Slave and indicate the function or purpose of the request. Messages are returned to the Master from the Slave with the requested data or an indication that the function has been performed. Modbus messages are coded differently for the RTU and ASCII transmission modes of the protocol. This makes the two protocols incompatible with each other.

Modbus messages

Modbus messages are called frames and there are two types involved in communication. The Protocol Data Unit (PDU) which contains a function code and data is one of the frame types. The other is the Application Data Unit (ADU) which holds the address and error-checking information. The function code indicates the action that is being requested to be performed with the data that accompanies the message.

Modbus devices contain coils that perform discrete on/off operations and registers which hold data. Function codes can request actions such as writing to a coil or reading or writing to a device’s registers.

Modbus RTU uses binary coding and a cyclic redundancy check (CRC) to perform error-checking. The ASCII Modbus transmission mode uses the less efficient longitudinal redundancy check (LRC) and ASCII coding so it is more readable that is RTU. The use of binary coding means that data can be moved more quickly and efficiently and is the reason that the RTU transmission mode is used when possible. Modbus ASCII is useful when modems are involved due to the way the messages are delimited.

The ability to decode Modbus messages is vital when trying to track down communication issues in a Modbus network implementation. If you work with serial devices and the Modbus protocol - Serial Port Monitor lets you see exactly what is going on between devices and swiftly take corrective action if needed.

3. Additional Features of Serial Port Monitor.

This professional-grade Modbus protocol decoder is packed with many other features that make it a great tool for monitoring any type of serial communication. Here are some highlights from the software application’s extensive feature list:

  • Monitor any number of serial ports simultaneously in a single monitoring session.
  • Monitor ports that are already opened by another application.
  • Capture data in real-time and view it in multiple formats.
  • User-friendly interface that can be used with basic computer skills.
  • Export monitored sessions to a file in various formats such as HTML, ASCII, Unicode, and CSV.
  • Monitoring sessions can be compared in the tool.
  • Supports any device that employs the RS232/RS422/RS485 interface.

Modbus Analyzer runs on the Windows operating system and requires that you have at least one serial port on your system. It is a great addition to the software toolbox of anyone who needs to work with serial devices.

Serial Port Monitor

Requirements: Windows (32-bit and 64-bit): XP/2003/2008/Vista/7/8/10, Windows Server 2012, Windows Server 2016 , 9.16MB size
Version 7.0.342 (13th Jan, 2018) Release notes
Category: Communication Application