Tom C
2008-08-14 10:40:30 UTC
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?