28
11.5 Write multiple registers (0x10)
This function is used for writing a block of contiguous holding registers in the slave. Register addresses start from zero, meaning that
a register numbered 100 is addressed as 99.
Example of request from master to slave
In the request, the slave with address 1 is asked to write the value of 0x0001 to the register at address 0x0020 and the value of 0xB0B0
to the register at address 0x0021.
Example of response from slave to master
The response returns the function code, starting address and quantity of registers written.
11.6 Diagnostics (0x08)
This function provides a test for checking the communication system between the master and the Grundfos slave. It contains a single-byte
subcode to identify the test to be performed.
The following subcodes are supported:
Example of response from master to slave
The response is identical to the request.
Example of response from slave to master
Address
Function
code
Start
address HI
Start
address LO
Quantity
HI
Quantity
LO
Byte
count
Register
33 HI
Register
33 LO
Register
34 HI
Register
34 LO
0x01
0x10
0x00
0x20
0x00
0x02
0x04
0x00
0x01
0xB0
0xB0
Address
Function code
Start address HI
Start address LO
Quantity written HI
Quantity written LO
0x01
0x10
0x00
0x20
0x00
0x02
Subcode
Name
0x00
Return query data
Data in this request are to be echoed in the response. The response must be identical to the request, so this
function is often used to verify Modbus communication.
0x01
Restart communications
All communication counters are cleared, and the device is restarted.
0x02
Return diagnostics register
Returns the 16-bit diagnostics register. See section
11.7 Diagnostics register interpretation
.
0x04
Force Listen Only
Forces the device into listen-only mode. This effectively mutes the device, making it unable to communicate on
the network. To bring the device back to normal mode, a "Restart communications" command (code 0x08,
subcode 0x01) must be issued.
0x0A
Clear counters and diagnostics register
Clears all counters and the diagnostics register. (These are also cleared on power-up/restart).
0x0B
Return bus message count
Returns the number of messages detected by the slave.
0x0C
Return bus CRC error count
Returns the number of CRC errors in the slave.
0x0D
Return bus exception count
Returns the number of Modbus exception responses that the slave has transmitted.
0x0E
Return slave message count
Returns the number of messages that the slave has processed.
0x0F
Return slave no response count
Returns the number of messages for which the slave has sent no response.
0x12
Return bus character overrun count
Returns the number of overruns in the slave.
0x14
Clear overrun counter
Clears the overrun counter. (This is also cleared on power-up/restart).
Address
Function code
Subcode
Data
Data
0x01
0x08
0x00
0xAB
0xCD
Address
Function code
Subcode
Data
Data
0x01
0x08
0x00
0xAB
0xCD