23
CP9xx-Kit_D00399_00_M_XXEN/07.2019
5. Modbus TCP server
5.1 Data access using Modbus TCP protocol
Requests are sent to the Modbus TCP server of the CP9… using function code FC4 (read input register). The
server generates a function-related response and sends it to the Modbus client.
5.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.
5.1.2
Modbus requests
The required words of the process image can be read from the input registers of the CP9… using the function
code FC4. For this purpose, the start address and the number of the registers to be read out have to be entered.
Example:
The words 0 and 1 are to be read from the input registers 0x100 and 0x101.
5.1.3
Modbus responses
The responses consist of 2 bytes per register. The MSB is the first byte.
Exception code
Description
0x01
Impermissible function
0x02
Impermissible data access
0x03
Impermissible data value
0x04
Slave device error
0x05
Acknowledgement of receipt (answer will be time-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 assign-
ment. 0x01 (corresponds to
the subsystem address 1)
Byte 7
Modbus function code
0x04
Byte 8, 9
Device address (BMS int * 0x100)
Device address assignment.
0x0100 (corresponds to the
device address 1)
Byte 10, 11
Number of words
0x0002
Byte Name
Example
…
…
…
Byte 7
MODBUS function code
0x04
Byte 8
Byte count
0x04
Byte 9, 10
Value register 0
0x1234 (fictitious value)
Byte 11, 12
Value register 1
0x2345 (fictitious value)
Summary of Contents for B95061094
Page 8: ...Important information 8 CP9xx Kit_D00399_00_M_XXEN 07 2019...
Page 10: ...Safety instructions 10 CP9xx Kit_D00399_00_M_XXEN 07 2019...
Page 14: ...Product description 14 CP9xx Kit_D00399_00_M_XXEN 07 2019...
Page 22: ...Installation connection and commissioning CP9xx Kit 22 CP9xx Kit_D00399_00_M_XXEN 07 2019...