Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

丢包率过高 #19

Open
shawn-show opened this issue Sep 29, 2021 · 1 comment
Open

丢包率过高 #19

shawn-show opened this issue Sep 29, 2021 · 1 comment

Comments

@shawn-show
Copy link

对西门子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次

@dathlin
Copy link
Owner

dathlin commented Aug 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants