LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switching Structured Cases conditions while inhibiting while loops with in the cases

I have built a VI based off of the Grab and Save to AVI file example.  It has the example being place into the "True" condition of a structured case for recording to AVI file.  The "Fasle" condition stops the recording.  I have moved the file selection part of the code to the outside of a while loop and place the rest of the code into the while loop.  The intent is to have file selection code run first before continuing into the while loop.  This way if the user decides to "cancel" the file selection the structure case would switch back to the "False" condition.  The cancel and return to the "False" condition works, but I can't figure out how to get the while loop from running. The input to stop the while loop only seem to operate after the code in the while loop has ran once, so I get errors due to not having selected a file path for my AVI.  Is there a means to inhibit the while loop from starting at all?
0 Kudos
Message 1 of 3
(2,417 Views)

If you don't want a while loop to run,then put it inside a case structure.

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

It would be much easier to understand your problem if you could attach a simplified version of your VI.

 

A while loop always runs at least once. There are many solutions to your problem, but it would really help to see some code to give more specific suggestions. Thanks!

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