Write Multiple Registers
This function is used to write one or more registers, but is only supported by the AD-
VL 500 for single parameters.
The master sends a request with the start address, the number of registers and the
registers to be written to the slave. If all data is in order, the slave answers with the
start address and the number of written registers.
Example: the master writes a 4-byte counter (unsigned uint32) with the value 243186
(0x0003B5F2) to register 45300 (0xB0F4) of the slave with address 2.
Request
SA
FC
RH
RL
RCH
RCL
BC
D0H, D0L, ... DNH, DNL
CRCL
CRCH
2
0x10
0xB0
0xF4
0x00
0x02
0x04
0x00, 0x03, 0xB5, 0xF2
...
...
Response
Slave
Funk.
reg.
High
reg.
Low
Anzahl
High
Anzahl
Low
CRC
Low
CRC
High
1
0x10
...
...
...
...
...
...
If an error occurs, the AD-VL 500 responds with an error message:
Exception
Slave
Error code
Exception
CRC Low
CRC High
1
0x90
see 8.1
...
...
Exception Codes
In the event of an incorrect request, the slave responds with an error telegram and one
of the following exception codes. The function code with 0x80 is returned as the error
code.
1 (0x01)
The modbus function is not supported.
2 (0x02)
The register address does not exist.
3 (0x03)
The data are invalid.
32