Jump to content

Condition to close a socket on V700


Recommended Posts

  • MVP 2023

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.

 

Unitronics Forum 170621.jpg

Link to comment
Share on other sites

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.

V130-socket-close.PNG.736a3a7acade7eb8593512709ee54fa3.PNG

On a Vision700 this proven procedure fails. I am getting the status bits with:

V700-socket-state.PNG.6a2679eed81fa18e7585ce4da4718a55.PNG

And trying to close the socket with:

V700-socket-close.PNG.2fc7411185224133d1f6149a59b3ff9f.PNG

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.