LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub VIs and Write to measurement

Solved!
Go to solution

Sub and meas.JPG

Conceptual question:  a program that uses a for loop like the one above (on the left) is made into a sub VI and is used in another program similar to the fashion on the right, where its 2 outputs are written to a file (i.e. the for loop on the left is inside the sub vi on the right).  If the program is set up similar to the image above and called as a sub vi, will it write a data point for each iteration in the loop, or will it only store the very last data point (because the loop is inside the sub vi and runs to completion before the data is ever written)?

 

I hope this was clear enough...

0 Kudos
Message 1 of 2
(1,971 Views)
Solution
Accepted by LarsUlrich

It will only output the last point because that is the last data written to the indicators before the subVI ends.

 

Note, there are also some message threads that recommend the indicators in subVIs should be put on the outermost level of the subVI block diagram.

Message 2 of 2
(1,955 Views)