LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph

Solved!
Go to solution

Hi,

I know it´s a very common topic but I don´t really see the solution for this case. I want to build a vi to visualize and analyze trends between different set of signals (strains & voltage). I can capture both types of signals and plot them in waveform graphs. Then when trying to plot one strian channels vs one voltage channel things don´t look great. Could you give me some hints?

Thanks

0 Kudos
Message 1 of 6
(3,130 Views)

A waveform graph is a plot of something versus time, where time increments in fixed amounts (deltat).  You can choose to plot it as points or as connected lines, which makes sense if you assume that time is continuous (which it is) and your sampled data varies continuously between samples.

 

An X-Y graph is sometimes called a "scatter-plot", as it is a plot of two often-unrelated variables against each other.  If you plot strain vs voltage as "dots", you'll get a cloud of dots that can suggest how these two variables are related to each other.  If you plot it as lines, you may get a mess as you are adding an implicit assumption that the X-Y correlation is a continuous function of time, whereas it more probably has a large "random" component.

 

Bob Schor

0 Kudos
Message 2 of 6
(3,116 Views)

Is there any chance you can include a constant on that VI containing some data that "don't look great"?

 

I can't tell if it's the graph that's ugly or the data that's ugly that's a problem.

 

Just looking at your VI I don't see any synchronization or timing setup.  Without that, you could be either collecting data starting at different times so the timestamps don't match up, or you could be collecting data at different frequencies, so the number of points and the time between them don't match up.  

 

If it's the second problem you can fix it just by not converting to an array of doubles, and graphing the full waveform wires as they retain the timing information.  If it's the first one, you'll need to sync your tasks up.

 

Or if it's just the points/lines on the graph that just look ugly, we need to see some sample data.

0 Kudos
Message 3 of 6
(3,115 Views)

Thanks to both for your quick and informative responses.

At the moment I cannot supply any piece of data because I´m doing the test setup, I don´t have the sensors connected yet and I´m only acquiring noise.

It´s true that there should be a random pattern at the moment but my concern is the plot itself. It only shows one pair (xi,yi) at a time which makes impossible any further analysis, there´s no historical data like you can see in a waveform graph.

As you say if I plot it using lines it only shows a piece of line (isolated) not connected to any other (x,y) pair (before or after). I´m not sure if I make myself clear.

0 Kudos
Message 4 of 6
(3,097 Views)
Solution
Accepted by topic author cobayatron

Are you sure you're not confusing a "Graph" with a "Chart"?

 

A "graph" in LabVIEW only shows what you most recently wired in to it.

A "chart" in LabVIEW shows the last N single points that you wired in to it, as it has an internal memory buffer.

 

And there's no such thing as an XY chart.

 

You'll need to add arrays of data in shift registers that you add to each time you take a measurement, and wire that into the XY graph each time.

0 Kudos
Message 5 of 6
(3,087 Views)

Thanks a million, that was my problem. Everything makes sense now.

0 Kudos
Message 6 of 6
(3,076 Views)