You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to to read data periodically using explicit messaging.
Currently I do the following:
create an instance of EEIPClient
register a session
read data
unregister the session
sleep
go to point 2
The idea is to register/unregister the session each loop cycle in order to prevent a disconnection from the device.
In case of connection lost (e.g. network issue, PLC reboot, etc.) I was expecting the library would be able to register a new session.
What happens is that after a few iterations, the device become unreachable.
I can't even ping it, I have to reboot it.
I would to know if my approach is correct or there is a better way to obtain the desired behavior.
If the approach is right, what could be the cause of this problem?
Thanks
The text was updated successfully, but these errors were encountered:
Personally, if you are connecting every 5 seconds, I would leave the connection open.
I can't leave the connection open because EEIP is not able to reconnect in case of loss of connection.
After some tests, it seems that the device doesn't become unreachable if I put a sleep over seconds between the the UnregisterSession and RegisterSession calls.
So the workaround I found is to leave the connection open and recreate the session in case of any error.
I think the sleep of 10 seconds solves the problem because the client doesn't wait for unregistration.
Is there a better way to check connection status?
I'm trying to to read data periodically using explicit messaging.
Currently I do the following:
The idea is to register/unregister the session each loop cycle in order to prevent a disconnection from the device.
In case of connection lost (e.g. network issue, PLC reboot, etc.) I was expecting the library would be able to register a new session.
What happens is that after a few iterations, the device become unreachable.
I can't even ping it, I have to reboot it.
I would to know if my approach is correct or there is a better way to obtain the desired behavior.
If the approach is right, what could be the cause of this problem?
Thanks
The text was updated successfully, but these errors were encountered: