Parallel Loops
This picture shows a simple block diagram (not from the Genome Center program) with two parallel while loops. The upper loop is running at a fairly slow rate, monitoring for user interaction and plotting data as they are available. The bottom loop runs very quickly and acquires data. Data are stored in a subVI that stores them for retrieval by the top loop. LabVIEW shares time between the two loops, giving much more time to the lower loop while it "services" the top loop at a rate that is satisfactory for displaying data.
The bottom loop also monitors for a switch to stop the program. It will stop as soon as it detects a TRUE from the "Stop" input. The upper loop is also watching the "Stop" input, but indirectly, through a RAM copy of the control. In this way, both loops will stop when a single button is activated.
Back to Paper