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.

  1. 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”:

  1. 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]).
  2. Add Library Instance
  3. Call the corresponding methods for diagnostics.
Call Methods for Diagnostics
Call Methods for Diagnostics

“GetErrorCode” returns the following diagnostic information:

“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: