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

What is the reason for the slow writing of variables using WriteAsynchronous? #539

Open
xuxiaokang0723 opened this issue Aug 24, 2024 · 2 comments

Comments

@xuxiaokang0723
Copy link

Using this function WriteAsynchronous (params DataItem [] dataItems), less than 10 variables are written, but it is very slow! What's wrong with not throwing anomalies but being slow?

@xuxiaokang0723
Copy link
Author

I use the WriteAsynchronous (params DataItem [] dataItems) function in the s7netplus library, which writes no more than 10 variables, but it is very slow. The code takes half a day to respond after executing this sentence, and the PLC also takes half a day to receive data. Why is this?

@mycroes
Copy link
Member

mycroes commented Aug 25, 2024

Just to be clear, all you're doing is opening a connection and then performing WriteAsync? There's no sense in that taking half a day, in all honesty there's no sense in that taking more than 10ms. However, the library applies queueing internally. If you were to queue up to half a day of reads and then perform the write, then this is very much expected (although not desired) behavior.

If you can provide a minimal reproduction of your issue I'd be happy to take a look.

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