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.


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...