Validating Modbus RTU Communications

The Modbus RTU Communications option includes a diagnostic program called mb_test.exe. You can use mb_test to perform read tests for each of the supported memory types.

Before you can use this program, you must successfully install the CIMPLICITY Modbus RTU Communication option and configure the Modbus RTU ports and devices using CIMPLICITY application configuration functions.

You cannot use this program while you are running the Modbus RTU device communication enabler over the same communications port.

To start the program:

  1. Open the Workbench for the project where the Modbus RTU driver is configured.

  2. Stop the project.

  3. From the Tools menu, select Command Prompt... to open the Command Prompt window for your project.

  4. In the Command Prompt window, type the command to invoke the diagnostic test you wish to perform.

The format for the command is:

mb_test [-B<baud rate>] [<parity>] [-T<port_id >]
[-S<slave id>] [-R<address>] [-C<count>]


-B<baud rate>

Defines the speed of the terminal line.


Default value is 9600.


Defines the parity for communications. Choose one of the following:




Defines EVEN parity.



Defines ODD parity.



Defines NO parity.



If no parity is specified, the default is EVEN parity.


Defines the port to be used for communications.


Default value is COM1.

-S<slave id>

Defines the slave to be addressed.


Default value is 1.


Defines where on the slave controller a read should begin.


Default is no read, just device connect.


Defines the number of elements to be read.


Default value is 1 element.


For the 3270 ACM, set <count> to an even number greater than or equal to 2.

For example, the command to read the first five holding registers on slave 7 from COM1 at 4800 baud using ODD parity is:

$ mb_test -B4800 -O -S7 -TCOM1 -R40001 -C5

More information

Modbus RTU Communications problem checklist.

About Modbus RTU.