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 of the 4-segment status display of a device or in the status bar in the lower right of the window .
There may be no Modbus communication despite the displayed fieldbus status “Running” (green). For example, variable values remain at “zero”.
- In this case, test the connection to the Modbus slave by disconnecting it and connecting it again.
Diagnostics from the Application
If the status indicator does not update and the Modbus server remains inaccessible, you can request further diagnostics via the library instance “FbModbusRemoteSlave”:
- To do this, insert the library instance in the application of the master (e.g., using the input help [F2] > Instance calls > “IoConfig_Globals” > [device name]).
- Call up the respective 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).
For additional information see:
- Workspace > General Status Display for Connections