01-23-2023 10:10 AM
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
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
01-23-2023 11:10 AM
The key is to pass the control reference to subVI.
01-23-2023 11:33 AM - edited 01-23-2023 11:34 AM
@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
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?
01-23-2023 12:02 PM
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
like the UpdateXyGraph.vi in your example.
Girish
01-23-2023 12:09 PM
@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.