LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For Loop in SubVI Only Giving Final Value

Hi all,

 

I'm currently working on a project in LabVIEW 2017 that requires two ways (two subVI's) of generating a 2D array of constants ("Input Constants"), one where the user can upload a txt file and another where the user can manually enter constants, then using each row of constants (a 1D array titled "Currently Used Constants") to control hardware. For each iteration of the for loop that indexes the 2D array, this 1D array will change. My issue is that the 1D array will only display values at the end of the loop's execution and only provide the final values in my main VI whereas the same array will update through each set of constants when just executing the subVI. I'm not sure if its an issue of my case and/or event structure or if it's something else. TIA!

0 Kudos
Message 1 of 2
(701 Views)

Yes, that is how SubVIs work. You get all of the outputs after the SubVI is finished executing, not while it is executing.

 

There are ways to send data between two VIs that are executing asynchronously, such as queues, channels, notifiers, user events.

0 Kudos
Message 2 of 2
(692 Views)