Kistler-Morse KM STXPlus User Manual
Page 58
APPENDIX C: MODBUS PROTOCOL SERIAL COMMANDS
MODBUS EXCEPTION RESPONSES
When a request is sent, a normal response is expected. One of four possible events can occur:
• If the device receives the request without a communication error, and can handle the query
normally, it returns a normal response.
• If the device does not receive the request due to a communication error, no response is
returned. A timeout condition will occur for the request.
• If the device receives the request, but detects a communication error (parity, CRC, ...), no
response is returned. A timeout condition will occur for the request.
• If the device receives the request without a communication error, but cannot handle it, the
device will return an exception response informing the client of the nature of the error.
The exception response message has two fields that differentiate it from a normal response:
Function Code Field: In a normal response, the device echoes the function code of the original
request in the function code field of the response. All function codes have a most–significant bit
(MSB) of 0 (their values are all below 80 hexadecimal). In an exception response, the device sets
the MSB of the function code to 1. This makes the function code value in an exception response
exactly 80 hexadecimal higher than the value would be for a normal response. With the function
code’s MSB set, the exception response can be recognized and the data field can be examined
for the exception code.
Data Field: In a normal response, the device may return data or statistics in the data field (any
information that was requested in the request). In an exception response, the device returns an
exception code in the data field. This defines the device condition that caused the exception.
C-5