04-20-2010 12:48 PM
Hi, inside a loop I acquire two curves (y1 and y2), with the same x axis. I want to plot them together, in the same xy graph, realtime. So I bundle them separately (x,y1 and x,y2), then the outputs go to the xy chart buffer functions, and finally I build an array which is connected to the xy graph. All is working, but the two curves have the same properties. Data are stored in different columns, as I can see from the Spreadsheet file, but in the graph they appear with the same plot.
Any idea. It is difficult for me to attach the VI here as Labview 6 is in another OLD computer without internet access
Thanks
Antony
Solved! Go to Solution.
04-20-2010 02:37 PM
Antony,
If you are just trying to plot 2 xy graphs on the same graph, it sounds like you are doing the correct thing. See attached png and make sure you are doing something like that.
-cb
04-21-2010 04:22 AM
It is almost the same as my VI, the only difference is that all this is inside a loop, so the only added bits are two XY chart buffers between the bundle and the build array. I need the graph to stay inside the loop because I want to see the evolution of the data while they are acquired. Furthermore, in your way the two plots are actually the same, as you cannot distinguish them while plotting. That's my main problem. To be able to distinguish the two xy plots (different symbols, colours...) drawn in the same xy graph
Thanks
04-21-2010 05:47 AM
04-21-2010 09:47 AM
04-21-2010 10:08 AM
Antony,
Hmmm. The suggestions that we have given you should work. If you wire up the code example I posted in the png, you will get a graph with two distinct plots on it. Have you tried that?
You should also be able to show the plot legend and be able to interract with both plots. Note: by default, the plot legend will only show one plot. You must resize it to show more than one. Maybe you are getting hung up on that.
What version of LV are you coding in? Is there some way you can upload a picture of the code you are trying to implement? Simplify it so that we are only dealing with the plot issue.
-cb
04-21-2010 11:30 AM
I was able to attach the pictures of the VI.
The content of the sequence is purely indicative, but they represent the problem I am facing.
Thanks for your help
Antony
04-21-2010 12:25 PM
Antony,
I think I see your problem. It looks like you are concatenating the array inputs to the build array vi. Right-click the build array vi and uncheck the "Concatenate Inputs" menu item. You should then get your two plots.
-cb
04-22-2010 09:27 AM
I tried unchecking the Concatenate inputs, but now there is the error to have connected two arrays of different dimensions (the dimension of the out of build array is 2, dimension of XY graph is 1). However, the dimension of the two clusters seem the same to me.
I tried following the help with Reshape array, the error goes, but there is no correct output, or no output at all.
Thanks
A.
05-10-2010 08:49 AM
Found the solution: you need to put a BUILD ARRAY CLUSTER after the two xyBuffers, before the XYgraph.
This works