Modbus
Modbus
Modbus
Quick Guide
Bonfiglioli-Vectron ReSC
26.11.2012
Content.......................................................................................................................................... 2
1 Introduction............................................................................................................................ 3
2 Modbus (RTU) ......................................................................................................................... 4
2.1 Single read/write parameter ............................................................................................ 4
2.1.1 Frame Description ............................................................................................................... 4
2.1.2 Examples............................................................................................................................ 5
2.2 Block Read Function.......................................................................................................... 6
2.2.1 Predefine Block read Parameter ........................................................................................... 6
2.2.2 Frame Description ............................................................................................................... 6
2.2.3 Factory Settings .................................................................................................................. 7
2.2.4 Examples............................................................................................................................ 8
The current inverter software supports access to 16-Bit and 32-Bit parameters via Modbus Function Code
0x03 Read Holding Registers
The Modbus Block Read function allows the user to read up to 32 16-Bit parameters in one RTU block trans-
fer.
If 32-Bit parameters have to be read via block read, they are converted to 16-Bit value which means that the
accuracy is not as good as it could be.
For the Block Read function a different access method is required which does not conflict with the current
method of accessing parameters.
Request
Address Function Dataset/Parameter Number of Register CRC
Read response
Address Function No. Bytes Parameter Value CRC
The Address field contains the slave-address in the Modbus message. Valid slave node addresses are the
range of 1-247. A master addresses a slave by placing the slave address in the address field of the message.
When the salve returns its response, it places its own address in the response address field to let the master
know which slave is responding.
The Address is set in Parameter 1376.
The Function Code indicates to the inverter what kind of action to perform. The most important functions
for Bonfiglioli Inverter are:
Function 03 (0x03) to read out 16 and 32bit parameter
Function 06 (0x06) to write single 16bit parameter
Function 101 (0x65) to write single 32bit parameter
No.Bytes For 16bit values there will be 2 Bytes; for 32bit values there will be 4 Bytes
Number of Register: To read out or to write 16bit values the number of register is 1. For 32bit values the
number of register is 2.
Parameter Value The value of the read out value or the new value of the parameter.
The CRC is the result of a “Redundancy Checking” calculation that is performed on the message contents.
To calculate the Cyclic Redundancy Check please check http://www.simplymodbus.ca/
Example read parameter 213 Active Power (16bit) Dataset 0 of Inverter with Address 1
Request
Address Function Dataset/Parameter Number of Register CRC
01 03 00 D5 00 01 95 F2
Example set parameter 1020 Power reduction reference value (16bit) Dataset 5 of Inverter with Address 1
to 50%
Request
Address Function Dataset/Parameter Parameter Value CRC
01 06 53 FC 00 32 D9 6B
Response
Address Function Dataset/Parameter Parameter Value CRC
01 06 53 FC 00 32 D9 6B
Example read parameter 850 frequency (32bit) Dataset 0 of Inverter with Address 1
Request
Address Function Dataset/Parameter Number of Register CRC
01 03 03 52 00 2 65 9E
Example set parameter 891 Filter Capacity Sinus Filter (32bit) Dataset 5 of Inverter with Address 1 to
10,000 mH
Request
Address Function Dataset/Para. Parameter Value CRC
01 65 53 7B 00 00 27 10 46 94
Response
Address Function Dataset/Para. Parameter Value CRC
01 65 53 7B 00 00 27 10 46 94
The Modbus Function 0x03 Read Holding Registers will be extended for the reading of up to 32 (RTU in-
verter parameters (16-Bit) in a single block transfer. This is used to reduce the Bus traffic.
The Modbus Block Read Function will allow the reading of up to 32 Inverter Parameters which correspond to
contiguous Modbus Register from Reg.No. 0xF01 to 0xF20 (3841-3872 dec.)
As the register numbers do not directly refer to the inverter parameter numbers, a mapping of the register
to inverter parameters is required.
This will carried out using an Index-Parameter with 32 indices, each containing an inverter parameter num-
ber selected from a choice list. The indices 1 – 32 refer to the register numbers 0xF01 – 0xF20 respectively.
All parameters corresponding to the Registers defined in the request are read in sequence and the data val-
ues then stored in the “Data” field of the Response Frame.
The Inverter Parameter P.301 and P.850 are 32-bit Parameter which are converted to 16-Bit.
The frequency (P.850) value has 4 decimal places and is transferred without the decimal point, i.e. the value
is multiplied by 10000 (e.g. a frequency value of 50,0025 Hz is stored as 500025 which corresponds to
0x7A139 in HEX format.
In order to convert this value in 16-Bits it will be cut to two decimal places, i.e. the stored value will be di-
vided by 100. Using the example above 500025 (50,0025Hz) will be transferred as 5000 (50,00Hz) thus
loosing the last two decimal places.
The Active Energy (P.301) has no decimal places. The convention is done by dividing the value by 1000
respectively by changing from kWh to MWh (e.g. a active Energy value of 6189 kWh will be transferred as
6MWh.
Request
Address Function Dataset/Parameter Number of Register CRC
Response
Address Function No.Bytes Data CRC
01 03 04 00 ... 50 AA FF
Data:
Hi-Byte Lo-Byte Hi-Byte Lo-Byte
st st
1 .Par. 1 Par. … Nth. Nth
Par. par.
N = No. of Registers
2.2.4 Examples
Request
Address Function Dataset/Parameter Number of Register CRC
01 03 0F 01 00 04 16 DD
Response
Address Function No.Bytes Data CRC
01 03 08 02 6C 15 85 02 46 01 A1 57 56