LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP reconnect to server

Hi!

 

I would like to do smoething that is explained here:

http://www.ni.com/example/28039/en/

 

Altough the files is to old for my LabView 2014 so I can not take a look into those files. But I would like my client to reconnect to the server if the server for some reasone die for a couple of minutes. I tried to do a while loop which containde both the reding while loop and TCP Open Connection. But it seems to be overflow when starting the server again (error code 63). Any ideas?

0 Kudos
Message 1 of 4
(4,877 Views)

Please share your code! That will make it much easier to help you. You may want to save it back to an earlier version since many people here have not yet upgraded to 2014; or, attach your code but also post a screenshot so anyone who can't open the VI can still see what you're doing.

0 Kudos
Message 2 of 4
(4,862 Views)

So the attached picture shows the server (exactly as it is in the simple TCP example) and client which has the modification that there is a while loop around the original client code also from the simple TCP example. 

Download All
0 Kudos
Message 3 of 4
(4,831 Views)

The Simple TCP Example server is not a good example for what you want to do. The server has to be able to detect that the client disconnected and go back into listen (waiting) mode for new incoming connections.

 

If you look in Example Finder for TCP examples you should take a closer look at Data Server.vi (allowing only one simultanous connection at the same time) or one of the other two DataServerUsingReentrantRun.vi or DataServerUsingStartAsynchronousCall.vi to see a server architecture that allows a client to disconnect on error an then reconnect.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(4,814 Views)