The diagnostic functions are only intended for serial communication. However, the serial diagnostic counters can be read, but not reset, via the Modbus TCP/IP interface. The serial line cannot be forced to the listen mode via the Modbus TCP/IP interface.
Function code | Name | Description |
---|---|---|
00 |
Return query data |
The data in the query data field is returned (looped back) in the response. The entire response is identical to the query. |
01 |
Restart communication option |
The server's peripheral port is initialized and restarted and the communication event counters are cleared. Before this, a normal response is sent provided that the port is not in the listen-only mode. If the port is in the listen only mode, no response will be sent. |
04 |
Force listen only mode |
The server is forced to enter the listen only mode for Modbus communication. |
10 |
Clear counters and diagnostic register |
All counters and the diagnostic register are cleared. |
11 |
Return bus message count |
The response returns the number of messages in the communication system detected by the server since its last restart, clear counters operation or power up. |
12 |
Return bus communication error count |
The response returns the number of CRC errors encountered by the server since its last restart, clear counters operation or power up. |
13 |
Return bus exception error count |
The response returns the number of Modbus exception responses sent by the server since its last restart, clear counters operation or power up. |
14 |
Return server message count |
The response returns the number of messages addressed to the server or broadcast which the server has processed since its last restart, clear counters operation or power up. |
15 |
Return server no response count |
The response returns the number of messages addressed to the server for which a response (a normal response or an exception response) has not been sent since its last restart, clear counters operation or power-up. |
16 |
Return server NACK response count |
The response returns the number of messages addressed to the server for which a negative acknowledgement response has been sent. |
18 | Return bus character overrun count | The response returns the number of messages addressed to the server for which it has not been able to send a response due to a character overrun since its last restart, clear counters operation or power up. |