LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner - How to find Y value if I have only X value?

In my application there are waveform chart and a XY graph. When I click over a graph, I get the X value. But I want to know the value of Y for that X value in another graph. Is it possible? How?

I am using labview 8.2

Thank you in advance!

Message Edited by Oliveira on 05-10-2007 03:45 PM

0 Kudos
Message 1 of 7
(4,175 Views)
what do you mean by "When I click over a graph, I get the X value"? Do you use the cursor value? the mouse position?
0 Kudos
Message 2 of 7
(4,158 Views)
I use the '"WaveForm Chart:" Mouse Down' event to do it.

So, I connect the "Coords" property to "MapCoords to XY" method.

After, getting the value of X, I want to know the value of Y in another graph, using the X that I got before.

Thank you in advance.
0 Kudos
Message 3 of 7
(4,129 Views)

Hi,

If both Graphs use the same X value, you can simply Index the Array of Y values with your newly discovered X value.  If the graphs were plotted with different X scales you will have to use the "Interpolate 1D array" and "Threshold" Vi's to look up the value of X within the other graphs array of x values to find its index.  Then use that index to pick out the Y value.

Craig

LabVIEW 2012
Message 4 of 7
(4,119 Views)
I understood what you explained, but I don't know how to code it.

Could you help me?

Thank you in advance
0 Kudos
Message 5 of 7
(4,106 Views)

Hi,

Have a look at the Attached vi.  It should be a starting point for you 🙂

Craig

LabVIEW 2012
Message 6 of 7
(4,101 Views)
In fact try this one (It has some default values in it, arent i kind to you :))
LabVIEW 2012
Message 7 of 7
(4,098 Views)