4.6.3 Write one bit
Instruction
Response
Example
In the write bit function, the data blocks for instruction and response are
identical.
Slave
Function
address
0x05
1 byte
1 byte
Slave
Function
address
0x05
1 byte
1 byte
Writing a bit starting from bit address 0x0340 (this is bit 0 of the word address
0x0034).
For the addresses please refer to Chapter 7.2 Modbus addresses of important
device and process data, Page 47.
Instruction:
01
05
0340
Response (as instruction):
01
05
0340
4 Modbus protocol description
Bit address
2 byte
Bit address
2 byte
FF00
8DAA
FF00
8DAA
Bit value
Checksum
xx00
CRC16
2 byte
2 byte
xx = 00 Bit is
set to 0
xx = FF Bit is
set to 1
Bit value
Checksum
CRC16
2 byte
2 byte
21