McProtocol
McProtocol copied to clipboard
三菱plc通信MC协议的实现。(This is a protocol for communicating with Mitsubishi PLCs.)
读数据程序无响应
我用工具读很快就可以读出来 ![image](https://user-images.githubusercontent.com/26960023/234446536-c829d0c1-d2fe-46da-b4cb-eeeaced6bbbc.png) 用下面的代码 mcProtocolTcp = new McProtocolTcp(ip, port, McFrame.MC3E); result = await mcProtocolTcp.Open(); public async Task GetBitDevice(string DeviceName, int iSize) { var bytes = await mcProtocolTcp.GetBitDevice(DeviceName, iSize); return bytes; //...
Now, READ and WRITE have to change the address specification. For example, to control W20, you need to do the following: ```c# //READ PLCData devices = new(PlcDeviceType.W, 0x20, 1); //WRITE...
I tried with below code. ```C# PLCData devices = new(PlcDeviceType.W, 0x100, 256); devices.ReadData(); StringBuilder sb = new(); for (int i = 0; i < 160; i++) { sb.Append(devices[i]); } sb.ToString();...