LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to realize this operation?

Hi there,
I am trying to realize the following operation, when I choose  an option, the program will run continuesly, if I choose another option, the program will run for only one time, I have make a test code as attached, I use a case structure and copy the code inside the while loop of "true" case to the "false" case, it barely works, however, when the code inside the "while" loop is very complicated, i dont want to copy the codes to the "false case". So are there any one has a better way to change the code structure and realize this operation? in the test code,  I only want one graph indicator in the front panel.
Thanks,
 
Mike   
0 Kudos
Message 1 of 2
(2,614 Views)
Well, you have full control on how many time the while loop runs, so of you want to loop only once, just make sure it stops after one iteration. There is no need to duplicate code if the only difference is how often it should loop.
 
Here's a rough draft: The loop will stop if either run once is selected (before runing) or the stop button is pressed during running).

Message Edited by altenbach on 08-13-2007 05:17 PM

0 Kudos
Message 2 of 2
(2,609 Views)