LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display data gathered in a subVI in a graph of the main VI?

I have written a largish application (~50 VI's) which acquires, analyzes, display and saves data from an instrument with a built-in DAQPad. My problem is that my block diagram is rather messy by now. I'm using an event structure in my main VI which reacts to buttons being pressed on the front panel. During data acquisition (one frame of the event structure), I need to do a lot of data processing, and I'm displaying both raw data and analyzed data on the front panel. I'm using a lot of subVI's for this, but I always need to get data out of the subVI's again to display it on the front panel, cluttering my block diagram. It would be much nicer if the subVI could update the main VI's graphs and indicators. I just found two examples with control references which show how a subVI can modify e.g. a 3Dgraph of the main VI, but I'm unable to use this with normal graphs and charts - I can't find a way to update the actual data in the plots (I can scale the plot or color it blue etc - but I really want to change the data it's displaying, not color it blue). Is there anything I'm missing? Is there example code for this kind of problem?

best regards
Martin
0 Kudos
Message 1 of 3
(2,165 Views)
im assuming that you want to update your graphs and indicators as you are performing your DAQ, otherwise, you can pass out your value/s when the DAQ completes.
I have attached a very simple example of using a reference to update your front panel graph.
Hope this helps.
0 Kudos
Message 2 of 3
(2,161 Views)
dear david,

your assumption was correct - my data acquisition is continuous (a measurement with my device may run for a long time - an hour or so), and i want the data to be displayed while it's being acquired.

thanks a lot for the example code! it helped 🙂

best regards
martin
0 Kudos
Message 3 of 3
(2,147 Views)