LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reinitialization of global variables

I'm trying to stop a program that I inherited from someone else and it has no way of stopping...I've created a global stop which I hooked up to every while loop stoping condition and it still doesn't really stop all the time which can be because of some for loops or sequence loops in subvis, but when it does stop it initialized my global stop to true and leaves it this way; therefore, I can't start the program again unless I esit out of labview completely or go and manually reinitialize the variables. I tried to use invoke node but that doesn't seem to help unless I'm doing it all wrong.
Please help me!!!!
p.s. i have attached a subvi that gets called by main vi and I try to stop the whole thing from there.
0 Kudos
Message 1 of 5
(2,307 Views)
This can be quite tricky.
Better than a Global use a little routine like LoopStop.vi. Us this in each loop that will not stop itself and you regain control, You put it after the loop exit conditions have been developed in your loop to add one more check “Has the program been stopped?”. Take care to initialize it before it is referenced!
Beware also of the quitting form a subroutine, but not the whole way. You will need a SubVILoopStop for that case.
Good Luck
John www.tradersmicro.com
0 Kudos
Message 2 of 5
(2,306 Views)
Here is the VI I mentioned.
John Brohan
0 Kudos
Message 3 of 5
(2,287 Views)
This place has only labview 6.1 so i can't open that file...anyways u have 6.1 or screen capture that for me so i could take a look..
0 Kudos
Message 4 of 5
(2,278 Views)
Here you are in LV 6.1
YOurs Sincerely
John
0 Kudos
Message 5 of 5
(2,263 Views)