From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping a while loop inside a while loop

Hello,

 

I have a while loop which is inside a while loop which houses my enetire application, When stopping the inner while loop portions of my outer loop stop working, How do I setup the inner while stop that it will not interfeer with the outer while loop?

 

Thanks,

 

Gil,

0 Kudos
Message 1 of 4
(2,341 Views)

Your question is so vague as to be completely unanswerable. Please be more specific. What are your 2 loops doing? Why do you have 2? What are you using to stop the inner loop? What are you using to stop the outer loop? What "stops working"?

 

Please post your code and then maybe we'll have something to talk about.

 

How To Ask Questions The Smart Way

0 Kudos
Message 2 of 4
(2,336 Views)

Dunno if I understood your question, but it seems from your question you simply must not use one while loop inside another, since the inner while loop stops up what happends in the outer, and you want the outer loop stuff to happen.

 

Use paralellism instead - a producer/consumer structure would solve your problem.

0 Kudos
Message 3 of 4
(2,298 Views)

It sounds like he is using a simple archetecture.  But switching to a different archetecture may not be necessary.  Simply because it doesn't work, doesn't mean scrap the whole thing and start over.  He's got a bug and needs to fix it.  Is it the best archetecture to use, absolutely not, but simple or general archetectures can be effective based on the application.

 

Post your VI so we can take a look and give you some pointers and suggestions for improvement.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 4
(2,271 Views)