From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I "find" Asynchronous VIs?

I like to use the Asynchronous Call and Forget function to start parallel loops, as it allows me to launch the parallel VI when all the prerequisites for it have been met.  It can also be done from within another loop without compromising Data Flow.

 

Sadly, sometime my code doesn't work 100% of the time, and the detached VI keeps running (even though I thought I told it to stop).  I've also had the situation of stopping LabVIEW and getting a warning that one or more VIs will have to stop.

 

Is there a programmatic way to "find" all of the VIs that have been started (and are still running) Asynchronously?  If so, one could (in principle) interrogate them, abort them, or simply "know about them".  I thought that maybe the Invoke Node "All VIs in Memory" (one of the Application Methods) would work, but it doesn't find the detached nodes.

 

Bob Schor 

0 Kudos
Message 1 of 2
(2,086 Views)

To date there is no publicly available way to get a list of cloned VIs, other then by guessing what the VI names are.  Starting in 2013 there are extra debug tools and you can go to View >> Browse Relationships >> Reentrant Items.  Admitidly I don't know under what circumstances VIs will show up here so your method of making clones may not cause them to be listed here.

 

There are two only other way I know of getting clone references.  One is to keep track of them your self.  When you make a new clone you can keep its reference in an array with all the others maybe in a functional global, then on close put that into a for loop and abort them all.

 

Or the crappier solution is on exit you could open a VI reference to something like "VI Name:1" through "VI Name:100" and abort them all.  Now some may not be valid, and you may miss some if you have a clone with a name greater then 100.

Message 2 of 2
(2,083 Views)