44
7 OPTION
44
OPTION
Chapter
7
06 (0x06) Write single register
A slave holding register is changed (rewritten).
If broadcast (0) is specified, all slave holding registers of the same address are rewritten.
To request, specify the holding register address and change data.
Example) Change the moving average filter (address 40009) value to 20 (0x0014).
Keep in mind that the relative address for writing in the moving average filter is 0x08.
In the case of normal writing, the response becomes identical to the request.
15 (0x0F) Write multiple coils
On slave coils, data is changed by the specified number of coils from the specified address.
If broadcast (0) is specified, all slave coils of the same address are rewritten.
To request, specify the coil address and the number of bytes and output value to change.
* N = Number of coils/8 or N = N + 1 if indivisible
[Request]
Function 1 byte 0x06
Start address 2
bytes 0x0000 - 0xFFFF
Output data 2
bytes
[Response]
Function 1 byte 0x06
Start address 2
bytes 0x0000 - 0xFFFF
Output data 2
bytes
[Error response]
Error code 1 byte 0x86 (function + 0x80)
Exception code 1
byte 01 or 02 or 03
[Request]
Function 06
[Response]
Function 06
Start address; higher 00 Start address; higher 00
Start address; lower 08 Start address; lower 08
Moving average filter;
higher
00
Moving average filter;
higher
00
Moving average filter;
lower
14
Moving average filter;
lower
14
[Request]
Function 1 byte 0x0F
Start address 2 bytes 0x0000 - 0xFFFF
Number of coils 2
bytes 0x0001 - 0x07B0
Number of bytes 1
byte N *
Change data N×2 bytes
[Response]
Function 1 byte 0x0F
Start address 2
bytes 0x0000 - 0xFFFF
Number of coils 2 bytes 0x0001 - 0x07B0
[Error response]
Error code 1 byte 0x8F (function + 0x80)
Exception code 1
byte 01 or 02 or 03