LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing values from while loop

Is there any way to pass values outside of the while loop before the loop has terminated?  From what I understand, if you use a tunnel, the data isn't there until the entire loop has terminated.  Right now, the only way I can get at the data is to place the indicator inside the while loop, which is kind of useless.
0 Kudos
Message 1 of 4
(2,741 Views)
If you have two loops in parallel you could use a queue to pass data from the producer loop to the consumer loop.  What kind of architecture are you using in your program?
0 Kudos
Message 2 of 4
(2,737 Views)
I have a multicolumn list box with a bunch of values in it.  I then have a loop that gets the next value in the list box at a certain time interval.  I would like to be able to use this outside the loop while the loop is still running.  The loop runs until it has gone through all of the values in the list box.
0 Kudos
Message 3 of 4
(2,733 Views)
I would use either a queue or a notifier as a way to get the data outside of the loop.  Another approach would be to use a state machine.  You could get the next value from the list box in one state, pass it inside of a shift register and act upon it until the time interval roles around again at which point you get the next value.  Not being more familiar with your application I dont know if this is the best solution for you or not.
0 Kudos
Message 4 of 4
(2,712 Views)