LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Second plot in XY Graph passed by control reference to subVI

Hoping someone can shed some light�

I�m trying to modify someone else�s code, so I�m trying to minimize the impact. Here �s the scenario:

We are using an XY Graph to plot a variable (viscosity) versus time, and want to overlay two more plots (temp and torque). One subVI acquires data from the viscometer and places it into an array. The data is then passed into another subVI (Write Viscometer Data), which does the file output and plotting. The WriteVData subVI is given a control reference to the XYGraph to modify the plot.

WriteVData (subVI) uses a property node to obtain the array of clusters of data points from the XY Graph�s VALUE prop. and appends the new data to it. Once the a
rray is updated, it is �given back� via the VALUE prop thru the reference.

The problem:

I can�t figure out how to access the second plot�s data array in the subVI! I have tried to use the ACTIVE PLOT prop in conjunction with the VALUE prop, but no luck.

Is there any way to do this? Thanks for any responses!


Jon
0 Kudos
Message 1 of 2
(2,839 Views)
To get at the data of the second plot, you just need to use the Value property node. What you get out is all the data for all the plots displayed on the graph, usually in the form of an array of clusters. All you need to do is index the array to get the plot data you want.
0 Kudos
Message 2 of 2
(2,839 Views)