Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203364

Re: filling one tank from two separate tanks.

$
0
0

The issue is basic dataflow. LabVIEW programs run under what is called a dtaflow paradigm. That means that any node can begin executing as soon as data is present at all its inputs and that its outputs will be available only after everything within the node completes execution.  A node is essentially any part of the program which has a border around it.

 

So the two Multiply functions can begin running as soon as the program starts because their inputs are constants and Numeric control terminals.  Either one could run first and they might not always run in the same order on different runs of the VI.

 

Similarly the two For loops can start running as soon as the calculations for their respective N terminals are complete. Their outputs are not available to the rest of the program until they have completed running. Since Tank 3 is wired to the output of the Add which is connected to the outputs of the For loops, the value of Tank 3 cannot change until both For loops have completed.

 

Since this sounds like an exercise to help you learn LV, I will not give you the fix. Hint: Since data flow keeps it from working the way you have wired it, try to use dataflow to get what you want.  This means that all the indicators need to be inside the same node.

 

Lynn


Viewing all articles
Browse latest Browse all 203364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>