04-27-2010 10:38 AM
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!
04-27-2010 12:19 PM
04-27-2010 12:37 PM
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