We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前逻辑是按照DeviceVariables循环串行读取,在个数多的情况下,性能会明显变慢 可以使用ReadMultipleVars方法批量读取数据加快响应,提高吞吐量
var pageSize = plcPageSize; var pages = (ioarg.Count / pageSize) + 1; for (int pageIndex = 0; pageIndex < pages; pageIndex++) { var source = ioarg.Skip(pageIndex * pageSize).Take(pageSize).ToList(); var items = source.Select(x => { var dataItem = S7.Net.Types.DataItem.FromAddress(x.arg.Address); return dataItem; }).ToList(); plc.ReadMultipleVars(items); for (int i = 0; i < source.Count; i++) { source[i].Value = items[i].Value; } }
The text was updated successfully, but these errors were encountered:
感谢你的建议。
Sorry, something went wrong.
No branches or pull requests
目前逻辑是按照DeviceVariables循环串行读取,在个数多的情况下,性能会明显变慢
可以使用ReadMultipleVars方法批量读取数据加快响应,提高吞吐量
The text was updated successfully, but these errors were encountered: