LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

which type of graph is suitable to plot dynamic data?

Hello everyone,

I have to plot a graph by retrieving data from running file.Then,selected portion of the graph is to be displayed by giving X and Y values range.Which type of graph suits this requirement?Waveform graph,chart or XY graph?

I'm new to Labview. Advice is much appreciated.Thanks in advance. 

0 Kudos
Message 1 of 18
(3,781 Views)

If you have data for 2 axis use an XY-graph.

 

Jens

Kudos are welcome...
0 Kudos
Message 2 of 18
(3,772 Views)

Time stamp is in X-axis,data is in Y-axis.

0 Kudos
Message 3 of 18
(3,761 Views)

@hmshwe wrote:

Time stamp is in X-axis,data is in Y-axis.


If the sample rate is constant (ie the time between samples is always the same), then build a waveform (you will need the time of the first sample and the sample rate) and use a Waveform Graph.  Otherwise use the XY Graph.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 18
(3,756 Views)

If I use XY graph,static data can be plotted,but dynamic data is not getting displayed.

0 Kudos
Message 5 of 18
(3,752 Views)

@hmshwe wrote:

If I use XY graph,static data can be plotted,but dynamic data is not getting displayed.


Then you are doing it wrong. Maybe you can share your code?

ʍolɟɐʇɐp ʞuıɥʇ
0 Kudos
Message 6 of 18
(3,745 Views)

this is my code.

0 Kudos
Message 7 of 18
(3,736 Views)

In that case try to use a Waveform graph, not a chart. And forget about the For-Loop.

Jens

Kudos are welcome...
0 Kudos
Message 8 of 18
(3,728 Views)

Use an XY Graph


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 9 of 18
(3,723 Views)

What do you really want to do?  What format is your data?  What do you mean by "plot dynamic data"?

 

I'm going to "make up" answers to these three questions (which may be entirely wrong for your situation) and then give a completely different answer to the suggestions that have been made here.  I assume:

  • You are acquiring continuously-sampled data (say, from an A/D converter) at a fixed sampling rate (say 1KHz).
  • You want to "play back" the data as though you were watching as it was being acquired, sort of like playing back tape-recorded data and looking at it on an oscilloscope.
  • You may want to do some minimal processing during the playback, for example to display the average of 100 points at a time so you see 10 "new" points a second instead of 1000.

If this is the case, namely you want to see the signal evolving in time (as opposed to examining the entire signal "all at once in a single image", you would use a Chart to display the results (as this gives you the evolving image).  When reading the data, you would mainly read the "data channel", using the "time channel" just to get the "dt" (time between samples) to set the X axis properties so it showed elapsed time (in milliseconds, seconds, minutes, hours, whatever is appropriate for your data).  You'd present the Y data points one-at-a-time to the Chart (using For or While loops) with a Wait (ms) inside the loop to "clock" the display update as appropriate.

 

So that's another option if this is what you really intend.  However, I agree with my colleagues that a Graph is more appropriate if you want "all-at-once" displays.  However, if the actual time that the data was acquired (e.g. 11:45 am, 6-Jul-2016) isn't important, you can simply create a single Y array of data and not present X, but let it be "implicit" (scale it by setting the X Axis Properties appropriately).

 

Bob Schor

Message 10 of 18
(3,697 Views)