LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference to Ex X Y Graph

I have 3 Ex X Y Graph objects in my front panel, graph1, graph2 and graph3. For a run, user may plot up to 3 data sets. I would like to create on subVi which looks something like this

girish53_0-1674489720328.png

where user would specify which graph object to use. Is it possible set up main VI based so that any dataset can be plotted on any graph based on user defined selection? So, the user can say 'use graph3 for dataset1', 'use graph2 for dataset 1' etc. In essence, how can I pass a reference to the graph object to use to the subVI?

Thank you. 

Girish Joglekar

 

0 Kudos
Message 1 of 5
(1,400 Views)

The key is to pass the control reference to subVI.

-------------------------------------------------------
Applications Engineer | TME Systems
Message 2 of 5
(1,374 Views)

@girish53 wrote:

I have 3 Ex X Y Graph objects in my front panel, graph1, graph2 and graph3. For a run, user may plot up to 3 data sets. I would like to create on subVi which looks something like this

girish53_0-1674489720328.png

where user would specify which graph object to use. Is it possible set up main VI based so that any dataset can be plotted on any graph based on user defined selection? So, the user can say 'use graph3 for dataset1', 'use graph2 for dataset 1' etc. In essence, how can I pass a reference to the graph object to use to the subVI?

Thank you. 

Girish Joglekar

 


It is insufficient to show pictures of express VIs. The build xy graph express VI has configuration options to retain data between calls, so if this is important (It seems to be since you wire scalars instead of arrays!!!), you need to explain in detail. For example what should happen to the internal data if the graphs are switched?

 

  • Are the x values spaced equally. Would a chart be sufficient?
  • Wouldn't it be simpler to use one graph with up to three plots, for example?
  • Please attach you code draft and explain exactly how it is operated and what the user should see.
  • Where does the data come from? What does it mean? How often is the data updated?
  • Why does it have to be a subVI?
0 Kudos
Message 3 of 5
(1,365 Views)

Thank you very much for sending the zip file. This is exactly what I have in mind. I do not know how to create a reference in the front panel 

girish53_0-1674496739595.png

like the UpdateXyGraph.vi in your example.

Girish

0 Kudos
Message 4 of 5
(1,342 Views)

@girish53 wrote:

Thank you very much for sending the zip file. This is exactly what I have in mind. I do not know how to create a reference in the front panel 


Right-click the graph terminal and "create reference". Right-click the reference and "create control". Place it wherever you want and connect it to the connector pane.

 

It probably won't help you much because the historic graph data is held inside the express VI, not inside the graph. You really (really!) need to explain exactly what you need.

0 Kudos
Message 5 of 5
(1,337 Views)