LXM32M | 3 Basics |
|
|
3.4.2"Function Code" 8 (Diagnostics)
This "Function Code" 8 (Diagnostics) allows you to read diagnostics data of the slave.
Modbus request Structure of the Modbus request:
Field | Bytes | Value | Meaning |
|
|
|
|
Function Code | 1 | 8 = 08h | Diagnostics |
|
|
|
|
2 | (various) | Diagnostics function | |
|
|
|
|
Data | 2 | (various) | Data (depending on diagnostics function) |
|
|
|
|
Modbus response Structure of the positive Modbus response:
Field | Bytes | Value | Meaning |
|
|
|
|
Function Code | 1 | 8 = 08h | Diagnostics |
|
|
|
|
2 | (various) | Diagnostics function | |
|
|
|
|
Data | 2 | (various) | Diagnostics data |
|
|
|
|
Structure of the negative Modbus response
Field | Bytes | Value | Meaning |
|
|
|
|
Function Code | 1 | 08h + 80h = 88h | Diagnostics |
|
|
|
|
Exception Code | 1 | 01h ... 04h | See chapter |
|
|
| "3.3.2 Modbus response to a Modbus request" |
|
|
|
|
|
| Diagnostics function | ||
|
|
|
| |
| 00 | Return Query Data | Return request as a response | |
|
|
|
| |
| 01 | Restart Communication Option | ||
|
|
|
| |
| 02 | Return Diagnostic Register | Return the error number in the case of synchronous errors | |
|
|
|
| |
| 03 | (reserved) | – | |
|
|
|
| |
| 04 | Force Listen Only Mode | Force "Listen Only" mode | |
|
|
|
| |
| 05 ... 09 | (reserved) | – | |
|
|
|
| |
| 10 | Clear Counters and Diagnostic | Clear all statistical counters | |
|
| Register |
| |
|
|
|
| |
| 11 | Return Bus Message Count | Return number of detected "Bus Message"s | |
|
|
|
| |
| 12 | Return Bus Communication | Return number of detected "Bus Communication Error"s | |
|
| Error Count |
| |
|
|
|
| |
| 13 | Return Bus Exception Error | Return number of detected "Bus Exception Error"s | |
|
| Count |
| |
|
|
|
| |
| 14 ... 15 | (reserved) | – | |
|
|
|
| |
| 16 | Return Slave NAK Count | Return number of detected "Slave | |
|
|
|
| |
01.2012 | 17 | Return Slave Busy Count | Return number of detected "Slave Busy"s | |
|
|
| ||
18 | Return Bus Char Overrun | Return number of detected "Bus Char Overrun"s | ||
| ||||
0198441113843, V1.01, |
| Count |
| |
|
|
| ||
>18 | (reserved) | – | ||
|
|
| ||
|
|
|
29 |