Modbus Analyzer

Modbus Analyzer

The Modbus Analyzer layer plugin can be attached to any Serial- or TCP-based stream session for analysis of Modbus RTU, Modbus ASCII and Modbus TCP frames traveling between a Modbus master and slave(s).

Normally, you want to start a relevant monitoring session or a transport session, such as:

... and then attach Modbus Analyzer on top of that.

Whenever Modbus frames are detected and parsed, human-readable desciptions will be printed in the log — side-by-side with the original data bytes. Nothing is lost — Modbus decoded messages complement the original raw data, not replace it.

Moreover, it's always possible to remove the Modbus Analyzer layer and get back to the raw, unprocessed data streams.

Monitoring Modbus RTU over Serial RS-232


If besides decoding a Modbus stream you need to transmit Modbus packets of your own (e.g., to read registers on a Modbus device), then the Modbus Analyzer can be used in tandem with the Modbus Packet Templete stock library as shown in a demonstation video below.

Modbus Analyzer + Modbus Packet Template library


To switch between RTU/ASCII/TCP modes, adjust the Protocol setting in the Modbus Analyzer setting group.

You can also assign and re-assign Modbus roles (Master/Slave) at any time using the Stream roles setting in the same group.

This plugin is quite useful in its own right, but it also serves as an example for how to implement protocol analyzers using IO Ninja scripting — you can use it as a starting point for your own protocol analyzer.

Monitoring Modbus over half-duplex RS-485

Configuring the Modbus Analyzer for half-duplex RS-485 is a common sticking point for many users. Please refer to the dedicated knowledge base article for more details.