Configuring the fieldbus
7.6 Communication via RS485
Inverter with CU230P-2 Control Units
168 Operating Instructions, 11/2013, FW V4.6.6, A5E02430659B AG
Write and read access via FC 03 and FC 06
Function codes used
For data exchange between the master and slave, predefined function codes are used for
communication via Modbus.
The Control Unit uses the Modbus function code 03, FC 03 (read holding registers) for
reading, and the Modbus function code 06, FC 06 (preset single register) for writing.
Structure of a read request via Modbus function code 03 (FC 03)
Any valid register address is permitted as the start address.
The controller can access more than one register via FC 03 with a request. The number of
addressed registers is contained in bytes 4 and 5 of the read request.
Table 7- 19 Invalid read requests
Exception code 02 (invalid data address)
Read a write-only register
Telegram in which all values are set to 0.
Controller addresses more than 125 registers
Exception code 03 (invalid data value)
The start address and the number of registers of an
address are located outside of a defined register
Exception code 02 (invalid data address)
Table 7- 20 Structure of a read request for slave number 17
03 h
00 h
6D h
00 h
02 h
xx h
1
2
3
4
5
6
Function code
Register start address "High" (register 40110)
Register start address "Low"
Number of registers "High" (2 registers: 40110; 40111)
Number of registers "Low"
CRC "Low"
The response returns the corresponding data set: