-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Sometimes takes 5-10 trials get a stable connection #42
Comments
Hi! I don't think it could be related to #4 . The return code after the connection attempt should confirm the connection state to you. The error message tells you the client you are using for reading/writing stuff is actually not connected. I see you run the connection in a Task: did you check if you attempt to connect multiple times with the same client? Any relation with a clean pc reboot let me just guess some resources might be not correctly disposed: you might try to analyze the object with a memory profiler. If you have multiple undisposed open sockets, the PLC might let you connect up to a max number of clients. If I were you, I would try to validate/debug your logic without a physical PLC, e.g. with SoftPlc. Best regards, |
Hi, Thanks for getting back. SoftPlc looks really cool tool, but I have the possibility to test it in the field, which I think is always better :-) I did not find a pattern so far, the problem seems a bit sporadic. Most of the time the first connection when restarting the app works. Which I find a bit odd, as both disconnecting the connection inside the app and when closing the app, I have understood that the rack and slot are always 0 and 2 in my case, as I connect to S7-300 CPUs. The problem persists. I get a random number of "An existing connection was aborted by the host computer under software control" exceptions happening at Could be related to #3 ? I feel like commenting the
So it seems to be a timeout happening inside |
I notice it sometimes takes 5-10 tries to establish connection, returning different errors, mostly "CLI: Client not connected". This seems happen more likely on the S7-300s and when my application has been closed and restarted (works fine after a complete reboot of the computer).
I was wondering if this is somehow related to not properly handling Sockets and their connection status? #4
Is there an established pattern/guideline on how to bind the connection, and what all possible error checks should be incorporated?
The text was updated successfully, but these errors were encountered: