Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there already a function to return the Signal value of a cursor between two points?

For a given signal, I want to get the Y value for a X value BETWEEN two points.  I can make an interpolate calculation, but I was wondering if such function already exist, like something

ScatterPlot1.GetYData(XyCursor1.XPosition)

0 Kudos
Message 1 of 7
(4,038 Views)
The Cursor has properties, XPosition and YPosition.

textBox1.Text = Convert.ToString(cursor1.XPosition);
0 Kudos
Message 2 of 7
(4,034 Views)

I want to get the Y value of the signal.  I already know the X value.  I should have asked my question differently:

Is there a function that return the Y value BETWEEN two points?

0 Kudos
Message 3 of 7
(4,020 Views)
There is the YPosition property. But I don't understand what you want. YOu have points x1 & x2 and you want the all the y points between x1 & x2? Create a loop and iterate through the x position getting the YPosition.
0 Kudos
Message 4 of 7
(4,016 Views)

Hi Lew,

 

You may want to look at the GetPlotAt method associated with the ScatterGraph. The GetPlotAt method returns the plot at the specified location in client coordinates along with the data value and the index to the data value.  For example you could say, ScatterGraph1.GetPlotAt(x, y, dataX, dataY) where x and y are the coordinates and dataX/dataY are the values.  Refer to the Measurement Studio Help for detailed information regarding the GetPlotAt method and the input parameters. There are four different GetPlotAt options.

 

Hope this helps!

 

Best Regards,

  
Jonathan N.
National Instruments
0 Kudos
Message 5 of 7
(4,011 Views)

GetPlotAt returns plot references and data points that are at the specified screen coordinates. It also only considers the screen coordinates of the points themselves. If you specify a screen coordinate that is on the line between plot points, it will return null. I do not think that this is what you're looking for.

The Measurement Studio graphs do not provide any methods to return x/y coordinates between data points. You will need to write your own interpolation calculation for this.

- Elton

Message 6 of 7
(3,999 Views)

Thank you Elton. 

you understood what I was looking for. 

My english is not perfect and my question was not as clear as it should have been, but thank you to every one!

0 Kudos
Message 7 of 7
(3,987 Views)