ModBus协议-功能码-0x06



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.


ModBus协议-功能码-0x06_第1张图片


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



ModBus协议-功能码-0x06_第2张图片


你可能感兴趣的:(ModBus协议)