28
akytec GmbH - Vahrenwalder Str. 269 A - 30179 Hannover - Germany Tel.: +49 (0) 511 16 59 672–0 - www.akytec.de
Table 5.6 List of possible errors
Name
Code
Description
MODBUS_ILLEGAL_
FUNCTION
01 (0x01)
Illegal function code. The error occurs if
Module does not support the Modbus
function specified in the request.
MODBUS_ILLEGAL_DATA_
ADDRESS
02 (0x02)
Illegal register address. The error occurs if
the request contains register addresses
that are not in Module.
MODBUS_ILLEGAL_DATA_
VALUE
03 (0x03)
Illegal data value. The error occurs if the
request contains an invalid value for
writing to the register
MODBUS_SLAVE_DEVICE_
FAILURE
04 (0x04)
The error occurs if the requested action
cannot be completed.
During the exchange via the Modbus protocol, Module checks the compliance of the requests with
the Modbus specification. Requests that fail verification are ignored by the module. Requests that
specify an address that does not match the module address are also ignored.
Next, the function code is checked. If a request is received by the module with a function code not
specified in
, a MODBUS_ILLEGAL_FUNCTION error occurs.
Table 5.7 List of supported functions
Name
Code
Description
MODBUS_READ_HOLDING_
REGISTERS
3 (0x03)
Reading values from one or more holding
registers
MODBUS_READ_INPUT_
REGISTERS
4 (0x04)
Reading values from one or more input
registers
MODBUS_WRITE_SINGLE_
REGISTER
6 (0x06)
Writing a value to single register
MODBUS_WRITE_
MULTIPLE_REGISTERS
16 (0x10)
Writing values to multiple registers
MODBUS_READ_FILE_
RECORD
20 (0x14)
Reading log from file
MODBUS_WRITE_FILE_
RECORD
21 (0x15)
Writing log to file
Situations leading to errors during operation with registers are described in
Table 5.8 Errors while working with registers
Function
Error name
Possible causes
MODBUS_READ_
HOLDING_REGISTERS
MODBUS_ILLEGAL_
DATA_ADDRESS
– number of requested registers is
greater than the maximum possible
number (125);
– request for nonexistent parameter
MODBUS_READ_
INPUT_REGISTERS
MODBUS_ILLEGAL_
DATA_ADDRESS
– number of requested registers is
greater than the maximum possible
number (125);
– request for nonexistent parameter
MODBUS_WRITE_
SINGLE_REGISTER
MODBUS_ILLEGAL_
DATA_ADDRESS
– attempt to write a parameter whose
size exceeds 2 bytes;
– attempt to write a parameter,
access to which is denied;