Application note
Integrated Modbus support
AN00198
ABB Motion control products
4
new.abb.com/motion
Exception responses
When a Client device sends a query to a Server device it expects a normal response. One of four possible events can occur
from the Client
’s query:
•
If the Server device receives the query without a communication error, and can handle the query normally, it returns a
normal response.
•
If the Server does not receive the query due to a communication error, no response is returned. The Client program will
eventually process a timeout condition for the query.
•
If the Server receives the query, but detects a communication error (incorrect CRC), no response is returned. The
Client program will eventually process a timeout condition for the query.
•
If the Server receives the query without a communication error, but cannot handle it (for example, if the request is to
read a non
–existent register), the Server 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 Server echoes the function code of the original query 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 Server 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 Client’s application program can recognize the exception response and can examine the
data field for the exception code.
Data field: In a normal response, the Server may return data or statistics in the data field (any information that was requested in
the query). In an exception response, the Server returns an exception code in the data field. This defines the Server condition
that caused the exception.
An illegal function response is generated if the Client requests a function other than those supported by the interpreter.
Mint specific settings
MicroFlex e190 and MotiFlex e180 are capable of operating as Modbus Clients and/or Servers via Modbus TCP. MicroFlex
e190 can be equipped with a OPT-SIO-1 option card and is also capable of operating as Modbus Server via Modbus RTU.
are only capable of operating as Modbus servers. Both products support Modbus RTU, only
NextMove e100 supports Modbus TCP
Support is provided for the following Modbus Server functions:
•
03
– Read holding registers
•
04
– Read input registers
•
06
– Preset single register
•
16
– Preset multiple registers
•
23
– Read / write 4x registers
Support is provided for the following Modbus Client functions (only MicroFlex e190 and MotiFlex e180):
•
03
– Read holding registers
•
04
– Read input registers
•
16
– Preset multiple registers