udubiel Posted June 20, 2017 Report Share Posted June 20, 2017 What is a proper condition to close a socket on a Vision700? I have a Modbus-Master running on a Vision700 without user action. When connection to a slave is lost, I want to close the socket, so it can reconnect again. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted June 21, 2017 MVP 2023 Report Share Posted June 21, 2017 If the connection is lost, the socket is already closed, is it not? Isn't the socket being open the definition of a connection? Just reconnect. In fact, if you gate the socket connect function with an inverted contact of a bit that is on when the socket is open, you can trigger a reconnect as often as you like and it will do nothing until the connection is lost. Link to comment Share on other sites More sharing options...
udubiel Posted June 22, 2017 Author Report Share Posted June 22, 2017 Thanks for your reply! I am not shure, if connection is lost, the socket is allready closed. With a Modbus-Master on a V1210 once I expierenced longer (~ 1min) delays before reconnect, when I removed ethernet cable and plugged it in again. I have shortened the delay by explicitly closing the socket. From then on I always used this in my Modbus-Sequence - not really shure, if this is really needed. On a Vision700 this proven procedure fails. I am getting the status bits with: And trying to close the socket with: I think it failes, because the socket status bits are not continuously ON during a cycle. In Online-Test I can see a flicker. But - nevertheless - my Modbus-Sequence is working even without socket close. By now reconnect times do not seem to be critical. Maybe the reconnect delay depends on Socket-Timeout-Values on both machines. With short timeouts, no socket close would be needed. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted June 22, 2017 MVP 2023 Report Share Posted June 22, 2017 Yes, timeout values will impact performance in this situation. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now