Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Get amount of samples of a waveform graph

Hi,

 

I assume that the waveform graph control only uses a subset of the points it has in its buffer to display a plot. In my application for instance, I provide the waveform graph with five data points every 250ms and my x-axis has a range of 2h. So plotting all points wouldnt be a good idea. Because Id like to compare Measurement Studio with other SDKs, Id like to know how much points the waveform graph actually used to display the graph. Is there a way to get this value?

 

Regards,

Janosch

0 Kudos
Message 1 of 4
(4,294 Views)

The number of points that a plot uses for displaying is defined by the properties HistoryCapacity and HistoryCount on the plots (for ex: waveformGraph1.Plots[0].HistoryCapacity). If you call one of the PlotAppend methods to append data, if appending the data exceeds the HistoryCapacity, then the oldest points would be discarded to accommodate the points being added.

-Mahesh
National Instruments
0 Kudos
Message 2 of 4
(4,281 Views)

Janosch -

Mahesh explained how to get the size of the buffer that the graph holds onto for a particular plot.

 

You might be interested in knowing how many actual points are drawn, considering cases where there are more values to plot than there are horizontal pixels to plot them to.

 

The MStudio controls do not expose this information. However, I can tell you that the MStudio WaveformGraph does decimate the data so that we don't spend time drawing lines that are completely overwritten by other lines. As you can imagine, the actual number depends on the amount of data and the size (in screen coordinates) of the plot area. The MStudio WaveformGraph decimation algorithm yields no more than 4 points per pixel on the independent axis (i.e. X axis for PlotY and y axis for PlotX). In many cases, the algorithm yields only 1 point per pixel on the independent axis.

 

The MStudio ScatterGraph does not have such a decimation algorithm (all points in the data set are plotted).

 

Let us know if you are looking for more or different information.

 

David Rohacek

National Instruments

 

 

Message Edited by drohacek on 09-09-2009 11:17 AM
Message 3 of 4
(4,263 Views)
Thanks drohacek, that was exactly what I wanted to know. In my case however, it seams that there are still to much points for MS in the buffer. I started another thread on this here. It would be great if someone could help me there getting MS to handle large datasets (~1.5M points).
0 Kudos
Message 4 of 4
(4,246 Views)