HslCommunication icon indicating copy to clipboard operation
HslCommunication copied to clipboard

丢包率过高

Open shawn-show opened this issue 4 years ago • 1 comments

对西门子S1500系列进行读写,丢包率达到40%。

            var Connector = new SiemensS7Net(SiemensPLCS.S1500, "172.16.2.121")
            {
                ConnectTimeOut = 5000
            };
            var result1 = Connector.ConnectServer();
            var amount = 0;
            for (short i = 0; i < 10000; i++)
            {
                Connector.Write("DB1001.6", i);
                var output = Connector.ReadInt16("DB1001.6").Content;
                if (i == output)
                {
                    amount++;
                }
            }
            Logger.LogDebug($"进行输入10000次,正确{amount}次");
            Connector.ConnectClose();

结果是进行输入10000次,正确6060次

shawn-show avatar Sep 29 '21 06:09 shawn-show

需要确保该地址没有被PLC或是其他程序使用,我们实际使用测试读写100万次,没有一次失败

dathlin avatar Aug 12 '22 04:08 dathlin