LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programatically query number of running instances of re-entrant vi?

On my desktop, I have a shortcut to "Abort All VIs.vi".  It has "Run when opened" turned on.  Inside it does this:

I use this:

aav.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 21 of 25
(790 Views)

I'm guessing this is to do with something I don't understand about the context of these VI's execution, but neither are working for me in a test-  I launched a bunch of a re-entrant vi (basically just a vi that waits) asynchronously.  After which while theyre counting I run your stop/abort vi's and the reentrant vi's are still counting...

 

what am I missing?

 

thanks for sharing your code and the advice!

 

edit: spelling.

0 Kudos
Message 22 of 25
(783 Views)

@p27 wrote:

I'm guessing this is to do with something I don't understand about the context of these VI's execution, but neither are working for me in a test-  I launched a bunch of a re-entrant vi (basically just a vi that waits) asynchronously.  After which while theyre counting I run your stop/abort vi's and the reentrant vi's are still counting...

 

what am I missing?

 

thanks for sharing your code and the advice!

 

edit: spelling.


All VIs in Memory will NOT return clones...

 

Stopping clones is more complicated. How complicated? Read back a bit. I think it's explained earlier in this thread (a few times?).

0 Kudos
Message 23 of 25
(776 Views)

@paul_cardinale wrote:

On my desktop, I have a shortcut to "Abort All VIs.vi".  It has "Run when opened" turned on.  Inside it does this:

I use this:

aav.png


I made this VI, then opened up a project and started running some VIs to test it out. I ran my "Abort VIs" VI but it wasn't doing anything... I realized it was aborting itself on the first iteration of the loop 😄

Closing and reopening put it farther down in the context list and then it worked as expected. This will surely come in handy!

0 Kudos
Message 24 of 25
(759 Views)

@Gregory wrote:

@paul_cardinale wrote:

On my desktop, I have a shortcut to "Abort All VIs.vi".  It has "Run when opened" turned on.  Inside it does this:

I use this:

aav.png


I made this VI, then opened up a project and started running some VIs to test it out. I ran my "Abort VIs" VI but it wasn't doing anything... I realized it was aborting itself on the first iteration of the loop 😄

Closing and reopening put it farther down in the context list and then it worked as expected. This will surely come in handy!


This will abort all VIs in all contexts. Some contexts are running LabVIEW native processes, and they shouldn't be stopped!

 

It will abort itself before completion. 

 

This won't abort clones!! You need much more code to (somewhat) achieve that, see my previous post. This also won't abort "call and forget" clones. That issue is still pending (e.g. no solution afaik). 

0 Kudos
Message 25 of 25
(741 Views)