参考文章
https://github.com/zhaopeiym/IoTClient/blob/master/README-zh_CN.md
NuGet\Install-Package IoTClient
ModbusTcpClient client = new ModbusTcpClient("172.16.250.105", 502, 1500, EndianFormat.ABCD);
client.Open();
var r = client.Write("4602", (ushort)970, 1, 16); //4602是设定数
Console.WriteLine("4602下发结果Requst: " + r.Requst);
Console.WriteLine("4602下发结果Response: " + r.Response);
Console.WriteLine("4602下发结果Requst2: " + r.Requst2);
Console.WriteLine("4602下发结果Response2: " + r.Response2);
var cc = client.ReadUInt16("4600", 1, 03);
Console.WriteLine("4600Requst:" + cc.Requst);
Console.WriteLine("4600Response:" + cc.Response);
Console.WriteLine("4600Requst2:" + cc.Requst2);
Console.WriteLine("4600Response2:" + cc.Response2);
标签:Console,cc,印刷机,下发,client,PLC,WriteLine,4602 From: https://www.cnblogs.com/hlm750908/p/17652887.html