LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datasocket connection failure requires restart of VI

I'm using LabView RT 8.5 together with a cFP-2110. I have shared variables hosted on the cFP, as the cFP application works by itself without the need of a host PC application. However, a host PC application can be connected and read/write shared variables to work as a GUI. The shared variables are accessed with Datasocket VIs, as the same application is to be used on different cFPs with different IP addresses.

 

The Datasocket connections is opened once and then the variables are accessed in a while loop. Before accessing the variables, RT Ping Controllers.vi checks if the cFP is still accessible. If not (or if the Datasocket Read operation fails), the Datasocket connection is closed. Now here comes the problem. When I want to re-establish the connection with Datasocket Open, I only get Error 66 (Connection closed by the peer). The only way I have found to "reset" this behaviour, is to close/stop the host VI and start it again. Is there an easier way to solve this? I assume the reason lies in something not being reset in the connection between the PC and the cFP. But what, and how can it be reset? Note that I have closed the connection with Datasocket Close in case of a failure.

 

I do not need answers about how I can avoid the connection failures in the first place. They can e.g. be caused by the cFP being temporarily too busy or something. The issue is when a failure HAS occurred, I want to be able to re-establish the connection without restarting the VI. How?

0 Kudos
Message 1 of 6
(2,811 Views)
This might help
0 Kudos
Message 2 of 6
(2,798 Views)

As I said in my original post, the problem is not about getting the errors/failures. The errors only occur occasionally anyway. I do not need help with how I can avoid getting the errors. I want to know how I can restore the connection AFTER an error has occurred without having to restart the VI.

0 Kudos
Message 3 of 6
(2,789 Views)

Isn't there anyone with similar experiences?

 

I would assume that someone would be interested in being able to restore a connection after a failure. Improving connections to minimize the risk of failures is not anyway a 100% solution. Sooner or later a failure will occur. And in that case I am not pleased with having to restart the application in order to get the system back on track.

 

I have already tried searching for previous posts regarding this, but the search results are very poor. Any ideas?

 

 

Tom C

 

 

 

 

0 Kudos
Message 4 of 6
(2,767 Views)
I'm still hoping that someone would have ANY kind of experience concerning this...
0 Kudos
Message 5 of 6
(2,734 Views)

I have the same problem.....

It is a long time ago - did you solve it?

0 Kudos
Message 6 of 6
(2,344 Views)