06 (0x06) Write Single Register
This function code is used to write a single holding register in a remote device.The Request PDU specifies the address of the register to be written. Registers are addressed starting
at zero. Therefore register numbered 1 is addressed as 0. The normal response is an echo of the request, returned after the register contents have been written.
Tx:01 06 00 01 00 03
Rx:01 06 00 01 00 03
Tx分析
01 从机地址
06 功能码
00 01 起始地址
00 03 寄存器数值
Rx分析
01 从机地址
06 功能码
00 01 起始地址
00 03 寄存器数值
0x01 = 1
[1] 3