Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change the X-axis increment in a waveformgraph

The X-axis always increments by 1, but I am acquiring one point of data every 100 ms. So my chart moves 10 times fater that the real time. How can I set my x-axis to increment 0.1 every time I add data to my Waveformgraph in VB net?
The X-axis collection is not showing any property to change that.
I have a continuous data acquisition giving me timed data at 100 ms rate.
0 Kudos
Message 1 of 2
(4,320 Views)

Thank you for posting to the NI forums.  You can set the update increment of the WaveformGraph plot function by using the overloaded function as follows:

 

PlotYAppendMultiple( ByVal yData As Double(,),

   ByVal orientation As DataOrientation,  

   ByVal increment As Double )

 

I did this in the VB.NET example program, "ContAcqVoltageSamples_IntClk", by adding the following line to the dataToDataTable function.

 

WaveformGraph1.PlotYAppendMultiple(sourceArray, NationalInstruments.UI.DataOrientation.DataInRows, 0.1)

 

The increment will be set to 1 / (sampling frequency), so in your case, it will be set to 0.1.  This function is documented in the NI-DAQmx .NET Framework 2.0 Help.

 

I hope this helps.  Post back if you have any further questions.

 

Ed W.

Applications Engineer

National Instruments

Message Edited by Ed W on 05-04-2007 10:36 AM

0 Kudos
Message 2 of 2
(4,307 Views)