2.16 Details on Protocols
MEMOBUS Protocol
2-408
Writing to Multiple Hold Registers
Error Description
If the command message contains an error, the slave will ignore the requested function and return an error
response message.
7•••••••••0
(H)
(L)
(H)
(L)
CRC-16
(H)
(L)
(H)
(L)
(H)
(L)
(H)
(L)
Command
Slave address
Function code: 10 hex
First address
Number of registers
Number of data items
Contents of the
first hold register
Contents of the
next hold register
Contents of the
next hold register
The function code to write to hold registers is 10 hex.
Set the first address of the hold registers to change.
Set the number of hold registers to change.
Set the byte length of data to write.
Set the contents to write into the hold registers.
Error checking
7•••••••••0
(H)
(L)
(H)
(L)
CRC-16
(H)
(L)
Response
Slave address
Function code: 10 hex
First address
Number of registers
The function code to write to hold registers is 10 hex.
This contains the first address of the changed hold registers.
This contains the number of hold registers that were read.
Error checking
7•••••••••0
CRC-16
Slave address
Function code + 80 hex
Error code
Error code
1: Illegal function code
2: Illegal address for a coil, input relay, or register
3: Incorrect number of coils, input relays, or registers