LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to abort a loop an d force the running sub VIs to be aborted

Hi All,
 
I've been struggeling under this problem for days now. My structure contains 3 embedded for loops; several sub vis are being called during execution. A full execution can take up to a few hours as a slow temperature control is involved . The question is how can i break the outer loop, therefore the whole execution chain?  What will happen with the currently running sub VIs, if a loop is broken?
 
I've made some attempts to figure out a solution. I started with aborting just a subVi. I fed the control parameters via VI properties, and let the VI run using the RUN VI method. I allowed the execution to be continued without waiting for the sub VI to be finished. After this I run a queri for the abort boolean control in a while loop. So as per my understanding the subVI and the while loop should have been executed paralelly. Hovewer, the while loop seemed to be iterating much faster, the sub VI hardly moved forward. Any ecplanation?
 
Thanx
 
/Dzsoki
0 Kudos
Message 1 of 3
(2,581 Views)
Would you mind attaching your two VIs so we get a better impression what you're actually doing?
 
I don't know what "much faster" and "hardly moved forward" means in htis context. 🙂
 
What determines the speed of your main loop? Of the subVI loop?
Does "hardly" mean ...
  1. it runs continuoulsy, but slower,
  2. It gets called, but does only zero or one loop iteration?
  3. It gets called, but stops on its own.
0 Kudos
Message 2 of 3
(2,577 Views)
Hi,
 
I attached the main VI where the three embedded loops are. Regardless of my attempts, the question can be simplified to how can i abort the outmost for loop asyncronously via a GUI control. (i experienced that the GUI doesn't respond until an evet structure assiegned to another GUI control hasn't been completed, what makes the problem more complex...)
 
Answer to your questions.
 
Main loop iteration time is determined by the temperature control, a sub VI is waiting for the given temperature to be settled. Can take up to a couple of ten minutes.
 
hardly means, it run continously, but slower.
0 Kudos
Message 3 of 3
(2,553 Views)