LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i do two while loops together?

hi, i am new to labview. right now, i have a problem in my program. i have a stack which has many while loops inside for different stages, and at the same time , i also need another while loop to take measurements. can i do them simultaneously? because all the structures i found in lavbiew are sequential, if i get in one while loop, i cannot get out of it to do other things until it ends. thanks.
Here we are is not a perfect world.
0 Kudos
Message 1 of 2
(2,435 Views)

Realize that everything in LabVIEW does not have to be connected to something.  If you create a While loop off by itself somewhere, you've in essence created a new "thread" and that while loop will run by itself while everything else is running.  This is called "Parallel Execution" (or something to that effect), and can be seen easily by turning on the "Highlight Execution" feature.

Remember if your secondary While loop is taking measurements and your main loops are supposed to be processing those measurements (I'm assuming this is the case) you might need some kind of synchronization between the loops.  I find using the Queue structures to be the best way to do this.

-Danny

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