Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

History capacity for multiple plots

Hello,

 

I have some code modeled after the NI demo: Plotting:2010. This is where you plot multiple traces using a graph control with only one native plot in the plots collection. I want to have a history capacity of 10,000 for each of the plots. I find if I change the history capacity of the (only) plot to 10000, only the first trace ends up with that histoy capacity. All the other traces only show 1000 points of history. What can I do to make all the traces have the longer history capacity?

Here is my sample code:

Dim NAData(3,0)

NAData(0,0) = Testvalue0

NAData(1,0) = Testvalue1

NAData(2,0) = Testvalue2

NAData(3,0) = Testvalue3

sampleWaveformGraph.PlotYAppendMultiple(NAData)

 

If I set the X axis to 10000 only the trace for Testvalue0 is shown past 1000 samples.

 

Thanks,

Bartj

 

 

 

 

 

 

 

0 Kudos
Message 1 of 4
(2,760 Views)

Hi,

Could you let me know where you found the NI Demo Plotting? 

T. Le
Vision Product Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,722 Views)

Hello,

 

The demo came along with Measurement studio and was automatically installed at:

C:\Users\Public\Documents\National Instruments\MStudioVS2010\DotNET\Examples\UI\WindowsForms\Graph\Plotting\vb

 

Let me know if you need additional information.

 

Bartj

0 Kudos
Message 3 of 4
(2,720 Views)

Hi Bartj,

 

I think the reason why your history capacity only works on the first plot is because your plots are being added programatically and when you change the history capacity, it only changes the property for the first plot. 

 

You will need to change this property programatically if you want 10 000 for all of your plots.

You will want to add this code: 

Dim myPlots As WaveformPlotCollection = sampleWaveformGraph.Plots() to get a hold of every plot. 

Once you have one plot, you can add this line: 

myPlots.Item(0).HistoryCapacity = 10 000 to change the property value. 

 

Let me know if you have any questions about implementation. 

 

I hope this helps!

 

T. Le
Vision Product Support Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,710 Views)