LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Way to plot two variables on a chart by selecting the two variables on the front panel?

Hello,

 

I have created a VI to control a tensile tester which controls/outputs the following variables: time, load components in 6 directions, tensile displacements, displacements measured by a capacitance sensor.  

 

Is there a way such that there would be only one plot on the Front Panel, and there will be buttons on the front where I can select the variable for the x and y axis when the program is running?  

 

I only know how to make a plot using Chart Buffer using only two fixed variables.  The only way I think of doing this is making a plot for every single permutation of variables, then put those plots in Tab Control...is there an easier way?

 

Thanks! 

0 Kudos
Message 1 of 3
(2,508 Views)
You could simply use Radio Buttons and a Case Statement to route the desired signal to the chart (y), and your X axis (time) would be changed via Property Node depending on what item you were looking at.
Richard






0 Kudos
Message 2 of 3
(2,486 Views)

I have done this a lot in applications to save realestate and simplify the UI.  Basically, I create an enum (or typedef) describing the x or y-axis values I would like to display on a graph.  Using an event structure, you can watch for a change in these selector and re-plot your graph.  You store your data somewhere (possibly in an array) and simply index into that array based on what you want to show.  I attached a short example to illustrate this implemenation.  Hope this helps.  (LV2009)

-cb

0 Kudos
Message 3 of 3
(2,471 Views)