User manual

MODBUS RTU, ASCII, TCP 15
English
4. Exception codes
When the module receives a not-valid query, an error message (exception code) is sent.
According to the used MODBUS protocol mode, possible exception codes are as follows.
4.1 MODBUS ASCII/RTU
Values contained in Response messages are in hex format.
Response example in case of MODBUS RTU: 01830131F0
Example Byte Description No. of bytes
01 - Slave address 1
83 - Function code (80+03) 1
01 - Exception code 1
31 High
Error check (CRC) 2
F0 Low
Exception codes for MODBUS ASCII/RTU are following described:
$01 ILLEGAL FUNCTION: the function code received in the query is not an allowable action.
$02 ILLEGAL DATA ADDRESS: the data address received in the query is not an allowable address (i.e.
the combination of register and transfer length is invalid).
$03 ILLEGAL DATA VALUE: a value contained in the query data field is not an allowable value.
$04 ILLEGAL RESPONSE LENGTH: the request would generate a response with size bigger than that
available for MODBUS protocol.
4.2 MODBUS TCP
Values contained in Response messages are in hex format.
Response example in case of MODBUS TCP: 010000000003018302
Example Byte Description No. of bytes
01 - Transaction identifier 1
00 High
Protocol identifier 4
00 Low
00 High
00 Low
03 - No. of byte of next data in this string 1
01 - Unit identifier 1
83 - Function code (80+03) 1
02 - Exception code 1
Exception codes for MODBUS TCP are following described:
$01 ILLEGAL FUNCTION: the function code is unknown by the server.
$02 ILLEGAL DATA ADDRESS: the data address received in the query is not an allowable address for
the combined counter (i.e. the combination of register and transfer length is invalid).