PLC侧设置:
和校验+协议4
读D200单字: 05 30 30 46 46 57 52 30 44 30 32 30 30 30 31 返回“201”:02 30 30 46 46 30 30 43 39 03
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 private void ReadOrder(string Add) 2 { 3 Byte[] sendData = new Byte[20]; 4 sendData[0] = 0x05; //ENQ 5 sendData[1] = 0x30; //站号 6 sendData[2] = 0x30; 7 sendData[3] = 0x46; //PC号 8 sendData[4] = 0x46; 9 sendData[5] = 0x57; //命令 “WR” 57 52 10 sendData[6] = 0x52; 11 sendData[7] = 0x30; //报文等待 12 sendData[8