LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Help!How to stop 3 while loop? 如何停止3个while循环?

 

Hi,All,Now I have 3 while loop in a VI,when I press the STOP button,the 3 while loop stop together ,how to get it? I have try the local variable ,but I failed.

在一个VI中有3个while循环(不嵌套),如何通过一个STOP按钮同时停止3个while循环?试过局部变量了,不行。

0 Kudos
Message 1 of 7
(3,304 Views)

Can you post a simplified version, just the loops, with the Stop button and any locals you are using?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 7
(3,289 Views)

The local variables should have worked.

 

Did it not work because you got a broken arrow stating the Boolean latch action is incompatible with local variables?

Did work the first time, but then did not work the 2nd time because the loops only looped once?

Did it not work because only one of the loops stopped but the others kept running?

How did it not work.

 

Post either your VI or png shot of your code. 

Omar
0 Kudos
Message 3 of 7
(3,288 Views)

If you stop the innermost loop with the control or an indicator and wire out to the others stop condition, it should work.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 7
(3,281 Views)

I was thinking something along this line.

The poster is not clear how the three loops are set up, so we are only guessing.

ThreeLoops.png

Omar
0 Kudos
Message 5 of 7
(3,277 Views)

Then we can suspect the local variables isn't inside the loop and thus will never update.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(3,269 Views)

Awhile back, we put a group together to address just this problem.  We came up with quite a few answers (local variables, events, occurrences, data value references, action engines, single-element queues, ...).  Unfortunately, we could not come up with a single answer because it depended on the rest of the program.  So, a little code or an explanation of what you are trying to do will help us give you the best solution (which usually does not involve local variables).

0 Kudos
Message 7 of 7
(3,228 Views)