ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph data at a certain sampling rate

I am acquiring data at a sampling rate of 50kHz and I want to plot it on a graph or a chart continuously. The data is in an array which is connected to the graph/chart. I can see the signal (sine wave) but the time scales are not right. I have set "multiplier" field to 0.00002 to reflect my sampling rate but the start and end of the graph are not correct. They usually have a width of about 25 ms. How can I change it to 30 seconds? The graph should always be showing 30 seconds of data at any given moment. 

0 Kudos
Message 1 of 3
(5,088 Views)

Do you want it to be a graph or a chart?  They are 2 fundamentally different things.  A chart maintains a history of previous points and you can add to it a point or several points at a time.  A graph has no history and it only shows what you send to it at a given point of time.

 

One problem you'll have with a 50kHz sample rate and 30 seconds worth of data is that is 1.5 million samples.  That is way too many to truly be able to see on a graph or chart at one time where even a large display might only be 1000 pixels wide.

 

If you are using a waveform chart, you are probably seeing a limit on the chart history length which by default is 1024 data points.  At a 50kHz data rate, that would be about 20 ms worth of data.  Set the chart properties to have a larger history length.

Message Edited by Ravens Fan on 10-03-2008 11:52 AM
0 Kudos
Message 2 of 3
(5,080 Views)

Thanks!

I don't care if it's a graph or a chart. Viewing the history of the data is not a requirement. Besides when we are recording hours of data, it will take up a lot of memory.

I just increased the channel history size and now I can view data for 30 seconds (chart option). It doesn't look that good so I changed it to 5 seconds which is better. It also creates a scroll bar to view some recent data which is pretty nice.

 

Now I just need to clear the graphs at the beginning and make sure the time interval (5 seconds) is reset when I zoom in and out of the graph. Shouldn't be a big problem, hopefully.

 

 

Thanks again. 

 

0 Kudos
Message 3 of 3
(5,068 Views)