LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop tunnel has input but not used in loop

Hi,
There is an example in NI labview called "Smart Buffer Example" .
In the pic followed, We can see that two while loops has the same boolean input tunnel, but this tunnel seems to do nothing in the loop.
so, why the output of the smart buffer's boolean output connect to two while loops??

帖子被blacksmith在09-30-2007 02:11 AM时编辑过了

0 Kudos
Message 1 of 3
(2,712 Views)

The wire creates an artificial data dependency. The wire ensures that the two while loops cannot start until the subVI on the left has finished executing. THis is the desired behavior.

Without that wire, the subVI and the two loops would all start at the same time (or at least in unpredictable order), possibly leading to unpredictable behavior. For example, it could happen that the "write" operation in the first loop would execute before the "empty" operation on the left.

 

0 Kudos
Message 2 of 3
(2,703 Views)
yes, that's how ''smart buffer" should be used!

Thank you very much!
0 Kudos
Message 3 of 3
(2,695 Views)