Diagnostic Options for Modbus Communication
Diagnostics via the e!COCKPIT Interface
The status of the fieldbus is displayed on the user interface in various places, e.g., on the right field of the four-segment status indicator of a device or in the status bar in the lower right section of the window
.
It may happen that, although the fieldbus status is shown as “Running” (green), no Modbus communication occurs. Variables remain set to “Zero,” for example.
- In this case, try disconnecting and reconnecting the Modbus slave.
Diagnostics from the Application
If the status indicator does not update, and the Modbus server remains inaccessible, you can retrieve further diagnostics via the library instance “FbModbusRemoteSlave”:
- To do this, add the library instance in the master’s application (e.g., using the input help [F2] > Instance Calls > “IoConfig_Globals” > [device name]).
- Call the corresponding methods for diagnostics.

“GetErrorCode” returns the following diagnostic information:
- For Modbus TCP → status of the TCP/IP connection
- For Modbus UDP → status of the UDP socket of the master
- For Modbus RTU → status of the serial interface
“GetChannelErrorCode” returns the status of the passed channel number (starting at 1).
You can find more information on status messages in the e!COCKPIT manual in:
- Workspace > General Status Display for Connections