Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66844

How do I cancel TCP Open Connection prior to timeout?

$
0
0

I want to programatically cancel on ongoing TCP Open Connection prior to its timeout expiring. How do I do it? I'm using LV 2012.

 

I took a look at this thread: How to kill TCP-IP Listen or Open Connection while they are waiting to connect? but it didn't help.

 

I'm thinking I could put the TCP Open Connection in a VI, then invoke the VI by opening a VI reference to it and starting an asynchronous call that gives me a reference to the running VI. I could then use an Invoke Node on that reference to call Abort VI when I want to terminate it.

 

I tried this in the LabVIEW environment (i.e. I didn't compile) with a dummy infinite loop VI that blinked a boolean indicator. It worked (the subVI stopped and the invoking VI continued), and did not cause an error 1000 despite the help's admonitions to only use Abort VI on a top-level VI.

 

So far so good, but am I asking for trouble? And is there a more elegant way to do this in general, i.e. abort a SubVI that for reasons beyond my control doesn't have a canned abort function?

 

Thank you.


Viewing all articles
Browse latest Browse all 66844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>