Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WaveFormGraph - configure X-Axis

I'm having trouble customizing the X-Axis as time axis.

 

Y is showing Amplitude

X is supposed to show a static range of 0-1000ms of my continous voltage -AI-task, like the attatched graph configured in labView. Cant figure out how to accomblish this with MeasurmentStudio in c#

 

 Untitled.png

0 Kudos
Message 1 of 4
(5,964 Views)

You can configure the Range of an AxisDouble with Range="0,1000" to get the view you describe, but that is just the initial range before data is assigned to the graph. Once the graph has data, the Adjuster will modify the range to accommodate the new samples. Also, by default the graph is configured with PreferIndexData set to true, which will ignore timing values if you are using a waveform data type.


So to display against time data, first set PreferIndexData to false. If your goal is to show a constant window of 1000 milliseconds, then you will want to use the ContinuousChart or PagedChart adjuster mode to keep the same window size as data is added. If your goal is just to show a "0" label on one end and a "1000" label on the other as a reference, then you may want to set the Visibility of the time axis to Collapsed, and add another axis (which will not be associated with the plot, and so will not update when the graph receives data).

~ Paul H
Message 2 of 4
(5,954 Views)

Thanks for your reply. 

Is there a similar fkt "PreferIndexData " for WinForms "WaveformGraph" ?

0 Kudos
Message 3 of 4
(5,900 Views)

Ah, I had not realized you were working with the Windows Forms graphs. In that case, the graph should default to showing samples by default ("PreferIndexData=true" in WPF). To show timing data, you can use the How Do I Display Timing Information When Plotting Waveforms? topic.

~ Paul H
0 Kudos
Message 4 of 4
(5,892 Views)