LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Realtime Plots Using XY Chart Buffer?

Solved!
Go to solution

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.

0 Kudos
Message 1 of 8
(3,623 Views)

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.

0 Kudos
Message 2 of 8
(3,616 Views)

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.

0 Kudos
Message 3 of 8
(3,613 Views)

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.

 

xy.png

0 Kudos
Message 4 of 8
(3,599 Views)

Arg, need coffee. Hang on, wiring up something useful.

0 Kudos
Message 5 of 8
(3,594 Views)
Solution
Accepted by topic author Nukem

xy2.png

Message 6 of 8
(3,590 Views)

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?

0 Kudos
Message 7 of 8
(3,589 Views)

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 

0 Kudos
Message 8 of 8
(3,583 Views)