An Exception Response message has two fields that differentiate it from a normal response: Function Code Field: In a normal response, the slave 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 slave sets the MSB of the Function Code byte 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 Master application program can recognize the Exception Response and can examine the data field for the Exception Code.
MODBUS Exception Responses
When a Modbus Master sends a request to a slave device, it expects a normal
response. One of four possible events can occur from the Master's query:
If the slave device receives the request without a communication error and
can handle the query normally, it returns a normal response.
If the slave does not receive the request due to a communication error, no
response is returned. The Master program will eventually process a timeout
condition for the request.
If the slave receives the request but detects a communication error (parity,
LRC, CRC, ...), no response is returned. The Master program will eventually
process a timeout condition for the request.
If the slave receives the request without a communication error but cannot
handle it (for example, if the request is to read a non-existent address or read
too many points), the slave will return an Exception Response informing the
Master of the nature of the error by using a specific Exception Code in the
response..
Data Field
In a normal response, the slave may return data or statistics in the data field (any information that was requested by the request). In an Exception Response, the slave returns an Exception Code in the data field. This tells what slave condition caused the exception. The following table shows an example of a Master request and slave Exception Response.In this example, the Master addresses a read request to slave device. The Function Code (01) is for a Read Coil Status operation. It requests the status of the output coil at address 1245 (04A1 hex). Note that only that one coil is to be read, as specified by the numbers in the output fields (0001).
1.Payment method and delivery
Shipment: EMS,DHL,UPS & FEDEX
Payment: T/T or Western Union
2. About us
We are professional company and we are expert in this business, we have highly experienced production team, or sales team, or purchase team, we have most advanced production line. We are reputable in the market.
3. Application industry
Our main products are widely used in metallurgy, oil and gas, glass manufacturing, aluminum, petrochemical, coal mine, paper making and printing, textile printing and dyeing, machinery, electronic manufacturing, automobile manufacturing, tobacco, plastic machinery, electricity, water conservancy, water treatment/environmental protection, municipal engineering, boiler heating, energy, power transmission and distribution, etc.