Discussion:
Datasocket connection failure requires restart of VI
(too old to reply)
Tom C
2008-08-14 10:40:30 UTC
Permalink
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?
muks
2008-08-14 13:40:18 UTC
Permalink
<a href="http://digital.ni.com/public.nsf/allkb/29895C80B1015A15862571DC0078747F" target="_blank">This </a>might help
Tom C
2008-08-14 16:10:09 UTC
Permalink
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.
Tom C
2008-08-15 06:10:06 UTC
Permalink
Isn't there anyone with similar experiences? &nbsp;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.&nbsp;I have already tried searching for previous posts regarding this, but the search results are very poor. Any ideas?&nbsp;&nbsp;Tom C&nbsp;&nbsp;&nbsp;&nbsp;
Loading...