LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create plot with time vs array

Hi I am new in the forum.
I have this problem.
I would representate 7 plots versus tiime.
I calculate time and measure the 7 values in Y-axis and put them in an array.
How I can do to plot the array versus time?

Thank you in advance
Raf

0 Kudos
Message 1 of 14
(5,119 Views)
hi raf, if your 7 plots are having same time interval then you can use the waveform graph.vi and on the right hand side upper corner is a sign for plot, extend this upwards and you will get the values plot 0, plot 1, etc. now u can wire the data of your 7 plots in this waveform graph.
0 Kudos
Message 2 of 14
(5,105 Views)
Attached is an example using XYGraph.

Message Edited by Robert.Bedford on 11-18-2005 08:45 AM

0 Kudos
Message 3 of 14
(5,101 Views)
Thank you, I'll try.
But the difference is that i have an array with 7 points and each one of the points is a value of the plot.
You send me an ecample in which each plot is an array.
Is the same?

Bye

0 Kudos
Message 4 of 14
(5,093 Views)
I think you should look at the shipping example called Real-Time Chart. Instead of a graph, it sounds like a chart might be more appropriate. In the example, it takes two separate points and creates a cluster. If you have an array, you can take take and use the Array to Cluster function to get the same thing.
0 Kudos
Message 5 of 14
(5,087 Views)
It does sound like you would be best served with Dennis' comments.  It seems that the waveform chart is the best for your work, but it takes a bundle of points for data (each plot is one element in the bundle).  What you would have to do is an array-to-bundle conversion to feed your 7-element array into a 7-element bundle into the chart.  However, you need to keep the previous elements in the graph, right?  For example, if your plotting 7 variables [v1(t)...v7(t)] versus time, and you update the chart at t_i, you don't want to lose the data at t_{i-1}, right?  How do you keep this previous data currently?

-Robert
0 Kudos
Message 6 of 14
(5,077 Views)
Attached is an example.  Ignore what I said earlier about keeping data from previous times.  IT seems to be a moot point with charts, which will keep previous data by default!  Oh thank goodness for LabView!
Message 7 of 14
(5,074 Views)
thank yuo everyone;

I convert the array into cluster and I use waveform chart to plot the values; but I don't know how I could put the time on x-axis of this cahrt; I saw the 'multichart.vi" example but in this example there isn't the way to use the time in the x-axis. I need to have the time in the x-axis and plot the various waveform in function of the time.
Please help me.


0 Kudos
Message 8 of 14
(5,058 Views)
Assuming you are taking the data at a constant (known) interval, you can set the dt in the graph directly, without any time wires.  To do so, right-click on the chart and select "properties."  When this opens up, select the "scales" tab and use the drop-down box at the top to choose "Time (X-Axis)."  SImply put in a multiplier and you are on your way!

Now if you are doing non-uniform steps, I don't think a chart will really do the trick.  Maybe someone can correct me, but it seems all charts only accept the y-axis input.   Sorry 😞
0 Kudos
Message 9 of 14
(5,036 Views)
hi raf, if i have understood ur problem clearly. you have 7 plots. each of these 7 plots have an array of x values and an array of y values and u need to show all of them on a single plot. one thing that i can suggest is that u use an XY plot. this XY plot is made up of 2 clusters. the first cluster is an array of x values and the second cluster is the array of y values. what u need to do is, for each plot make a cluster, this cluster shoud contain two arrays, one of x values i.e time data and one of your y values. now make 7 such clusters and then build an array of these 7 clusters, and wire them to the xy graph, you will get a graph of 7 plots. try this out, hope it helps
0 Kudos
Message 10 of 14
(5,022 Views)