39
COM465IP-COM465DP_D00216_02_M_XXEN/03.2017
6. Modbus TCP server
6.1 Data access using Modbus TCP protocol
Requests are sent to the Modbus TCP server in the COM465… using function code FC4 (read input
register). The server generates a function-related response and sends it to the Modbus client.
6.1.1 Exception code
If a request cannot be answered for whatever reason, the server sends a so-called exception code
with which possible faults can be narrowed down.
6.1.2 Modbus requests
The required words of the process image can be read from the input registers in the COM465… us-
ing the function code FC4. For this purpose, the start address and the number of registers to be read
need to be entered.
Example:
The words 0 and 1 are to be read from the input registers 0x100 and 0x101.
Exception code Description
0x01 Impermissible function
0x02 Impermissible data access
0x03 Impermissible data value
0x04 Slave device error
0x05 Acknowledgement of receipt (response delayed)
0x06 Request not accepted (repeat request, if necessary)
0x08 Memory: parity error
0x0A Gateway path not available
0x0B Gateway error
Byte Name Example
Byte 0, 1 Transaction identifier 0x0000
Byte 2, 3 Protocol identifier 0x0000
Byte 4, 5 Length field 0x0006
Byte 6 Unit identifier
Subsystem address
assignment. 0x01 (corre-
sponds to the subsystem
address 1)
Byte 7 MODBUS function code 0x04
Byte 8, 9 Device address (BMS int * 0x100)
Device address assign-
ment.
0x0100 (corresponds to
the device address 1)
Byte 10, 11 Number of words 0x0002