Function 8: Modbus Diagnostics
Structure of Modbus Messages Concerning I/O Smart Link Diagnostic Counter Management
Request
Definition |
Number of Bytes |
Value |
---|---|---|
Server number |
1 byte |
0x00 to 0x63 |
Function code |
1 byte |
0x08 |
Sub-function code |
2 bytes |
See the table “Sub-function codes” later in this topic |
Data |
2 bytes |
0x0000 |
Sub-function codes
Sub-function codes (Decimal) |
Description |
---|---|
- |
Data passed in the request data field is to be returned (looped back) in the response. |
10 (0 x 0A) |
Resets all diagnostic counters.. Counters are also cleared upon power-up. |
11 (0 x 0B) |
Reads the correct bus messages managed by the server counter. |
12 (0 x 0C) |
Reads the incorrect bus messages managed by the server counter. |
13 (0 x 0D) |
Reads the exception responses managed by the server counter. |
14 (0 x 0E) |
Reads the messages sent to the server counter. |
15 (0 x 0F) |
Reads the broadcast message counter. |
17 (0 x 11) |
Reads the messages sent to the server counter sent to the server but without a response because of exception code 06: server device busy. |
18 (0 x 12) |
Reads the incorrect bus messages due to overload errors counter. |
- |
Clears the overrun error counter. |
Response
Definition |
Number of Bytes |
Value |
---|---|---|
Server number |
1 byte |
0x00 to 0x63 |
Function code |
1 byte |
0x08 |
Sub-function code |
2 bytes |
See the preceding list |
Diagnostic counter |
2 bytes |
Value of diagnostic counter corresponding to the sub-function code |
Resetting Counters
The counters are reset to 0:
-
when they reach the maximum value 65535,
-
when they are reset by a Modbus command (function code 8, sub-function code 10),
-
when the power is cut off, or
-
when the communication parameters are modified.