modbus 是工业常用的通讯协议,原来是基于串口通讯的。后来随着TCP/IP的发展,出现了基于TCP的Modbus 这个源码就是基于TCP的modbus C#写的
1.读 D0000 多个寄存器的值 00 00 00 00 00 06 09 03 00 64 00 07
PLC 回答 00 00 00 00 00 11 09 03 0E 00 00 FF BB 00 00 00 00 FF FF
AB CD 00 00 06 06写 D0010单一 寄存器的地址 00 00 00 00 00 06 08 06 00 0A 00 08 00 00 00 00 00 06 08 06 00 0A 00 08
复位 00 00 00 00 00 06 1F 06 00 0A 00 01
收板 00 00 00 00 00 06 1F 06 00 0A 00 02
送板 00 00 00 00 00 06 1F 06 00 0A 00 04
急停 00 00 00 00 00 06 1F 06 00 0A 02 00
暂停 00 00 00 00 00 06 1F 06 00 0A 04 00
报警解除 00 00 00 00 00 06 1F 06 00 0A 08 00
1