07-18-2014 01:02 PM
Hi all,
Suppose I have a SubVI that plots Y1 vs. X1 and Y2 vs. X2 on the same XYGraph. See the attachment.
The XYGraph property node is linked to the XYGraph. It sets the line width and point style for each curve on the XYGraph.
If I call this SubVI 4 times in another code (to make 4 diferent XYGraphs (XYGraph1, XYGraph2, XYGraph3, XYGraph4, each containing two curves for Y1 vs. X1 and Y2 vs. X2)),
why would I need to create 4 different references for the 4 different XYGraphs?
The question really is this: if the property node is explicitly linked to the XYGraph in the SubVI, why would the property node need to be updated via a reference if the SubVI is called
multiple times to make multiple XYGraphs? Wouldn't the SubVI take the inputs, plot the curves the XYGraph, update the property nodes and then produce a final XYGraph with
updated properties?
Solved! Go to Solution.
07-18-2014 01:28 PM
If this is to be a subVI why do you have a graph on its front panel and manipulating its properties? You need to be manipulating the properties of the graph on the top-level VI's front panel. You see a graph is not a datatype -- it's a display object. All that is passed through terminals to calling VIs is data, and the datatype in this case is an array of clusters containing an array of x-values and an array of y-values.
If you want to make a subVI that does this operation you have to pass it a reference to the graph you want to manipulate as one of it's input data values.
Mike...
07-18-2014 02:28 PM
Thanks. That makes sense.