07-02-2013 12:12 PM
Hello All. My professor has expressed interest in adding a second data set to the realtime plot I have set up in my vi. I was able to make it plot both datasets, but not as two seperate plots. I somehow managed to add a second y point to the original plot. What is the proper method for using an xy-chart buffer inside a loop to plot two seperate plots?
The idea is that once I have two plots I can adjust a second axis and scale the second dataset to that axis.
Thanks!
Nukem,
LabVIEW 2010
ps. Here is an image of the small section of my program that is graphing the data.
Solved! Go to Solution.
07-02-2013 12:22 PM
After you get an array of x/y-bundled points, bundle that array and build it into another bundled array of x/y points.
In the detailed help for the xy graph, there is an example under: Displaying Multiple Plots on XY Graphs.
07-02-2013 12:28 PM - edited 07-02-2013 12:32 PM
If you look at the snippet I posted I have done that, but it only produces 1 plot. Both datasets are plotted, but they behave as one plot for property node purposes.
I have two x-y clusters of data that is built into an array, sent to the buffer, and sent to the xy-plot. I think because of the buffer it sees this as one plot. I think I need 2 buffers, but I can't figure out how to implement it.
The example you suggested I look at is not realtime plotting. I must be able to plot both sets of data in realtime for it to be useable. i.e. something involving the xy-chart buffer, as I have shown in my snippet.
07-02-2013 12:43 PM - edited 07-02-2013 12:45 PM
No you didn't. And if you use the XY Chart instead of the XY Graph, it handles the buffer for you.
Edit: Oh, you mean the bottom example.
07-02-2013 12:53 PM
Arg, need coffee. Hang on, wiring up something useful.
07-02-2013 12:59 PM
07-02-2013 01:07 PM
The XY-Chart Buffer does not accept the array after I added those single bundles (which doesn't make sense to me to even do). Nor can I find the XY-Chart. I tried searching for the indicator, and searched the help pages looking for it. Where is this XY Chart located?
07-02-2013 01:16 PM
Thank You Todd! That was exactly what I was looking for. I am still not sure I fully understand this single bundle stuff. I guess it is just recasting the data into a different form that it better understands.
Now to format these two plots.
Nukem