LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close reentrant vi still in memory

hi all,

 

In my code (LV 2011). I have many subpanels that load many reentrant VIs, I tried to keep the code clean in order to close all the VI when I exit the application but there is still some reentrant VIs in memory. How to get the references of all the reentrant VIs still in memory in order to close them at the end? thank you for your help!

 

Cedric

0 Kudos
Message 1 of 3
(3,408 Views)

I use a slightly different "Brute Force" technique.  I create a VIG called "Global Stop" -- it sits on the Error Line at the end of While loops with an output wired to the Stop indicator.  Every clone has one of these, as do any other "parallel loops" that need to be stopped.  This VIG has a "Stop Me" input that when called with True wired to it, sets True onto a Shift Register that is wired to the Output.

 

So now my code is running.  Every Clone, once a Loop, calls Global Stop and almost instantly exits with the default (False) output.  This call takes very little time, as this VIG basically "does nothing" except return its Shift Register as the "Stop" output.  At some point, I decide I need to stop all of the clones -- I call Global Stop and wire a True to its Stop input, which (in turn) causes each Clone to stop the next time it calls Global Stop.

 

Bob Schor

0 Kudos
Message 2 of 3
(3,398 Views)

Cedric,

     I forgot that I have a LabVIEW 2011 version of this (with the Error Stop and a Reset input, useful to "force-initialize" this VIG), which I've attached as a Snippet.  This particular VIG also has a Very Distinctive Icon ...

Global Stop.png

0 Kudos
Message 3 of 3
(3,382 Views)