Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

XAxis (MayorDivisions GridLine) Fixed range on continuous measurement

I need to solve a problem similar to the one described  here.

 

I'm using a Waveformgraph and I have the Xaxes mode set as StripChart so when my data exceeds the visible range, it will move over. But I would like to keep the Mayor Divisions GridLine fixed, while the range of xaxis is moving on the graph, and the plot is continuously drawn.

xaxes.JPG

0 Kudos
Message 1 of 6
(2,693 Views)

Hi mobdev,

 

Are you looking for something like the waveform graph inside of the "Arbitrary Wave Display" example where the grid lines don't move? You can find that example by going to:

 

Help -> Find Examples-> Analysis, Signal Processing, and Mathematics -> Signal and Noise Generation-> Arbitrary Wave Display.vi

0 Kudos
Message 2 of 6
(2,641 Views)

Hi rleonard,

Yes, I am looking something like that, but I could find that example you said. I don't have that example on my examples folder. Can you give more information please ?

Thanks in advance

0 Kudos
Message 3 of 6
(2,626 Views)

mobdev,

 

Do you mean you want the grid lines on the graph (you marked with red arrow) to stay in one place while the rest of the graph moves?

Can you send which parameters you are using in your graph function (just send the line of code).

0 Kudos
Message 4 of 6
(2,619 Views)

Yes, that is what I am looking for

zzzz.JPG

This is an example

       while (!this.waveformGraph1.IsDisposed)
            {
                double[] yData = new double[50];
                double amp = random.NextDouble() * 10;
                TimeSpan increment = TimeSpan.FromSeconds(500d);

                for (int i = 0; i < yData.Length; i++)
                    yData[i] = amp * Math.Sin(2 * i * Math.PI / yData.Length) + amp;

                  
                if (this.waveformGraph1.Plots[0].Mode != WaveformPlotMode.PlotY)
                    this.waveformGraph1.ClearData();
        
                this.waveformGraph1.PlotYAppend(yData);
                Application.DoEvents();
            }
0 Kudos
Message 5 of 6
(2,616 Views)

Hi mobdev,

 

Can you take a look at this example: C:\Users\Public\Documents\National Instruments\MStudioVS2013\DotNET\Examples\Application\SimpleGraph\cs

 

This example has a waveform graph that sets the x axis and y axis ranges which causes the grid lines to stay in place.

0 Kudos
Message 6 of 6
(2,604 Views)