LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph y=0

Solved!
Go to solution

Hellou.

 

I have two axis, arrays - x and y. I have them on the xy graph and also independently on two graphs.

I need value from x-axe when y-value is equal to 0.

Can someone help me?

 

Thanks, Steef

0 Kudos
Message 1 of 9
(3,935 Views)

We need to see your VI instead. XY graph accept a wide variety of data types (clusters of x and y arrays, arrays of points, complex 1D arrays, etc.) so we have no idea what you have. Are the x-values spaced equally or randomly?

 

You only circled one zero crossing, but I see two. Do you want both?

 

If the data is non-descending, you can use threshold array of the array of points, which gives you a linear interpolation between the two adjacent values. How closely are the points spaced? Is there noise (e.g. could there be two or zero crossings very close together?)

 

A better way would probably be to do a nonlinear fit to a mathematical model describing the data, then calculate the zero crossing from the best fit parameters.

 

Please attach your VI and some typical data (e.g. select the graph once it displays the data and "edit..make selected values default" before attaching). We cannot guess what you have.

0 Kudos
Message 2 of 9
(3,903 Views)

That is a measurements from Keysight U2541A. So, I thinks that is 250 samples in one graph.

I need only circled zero crossing.

 

For example I can read manually this vallue from my Array, but I need that as indicator - so how have I there values Hm,Br,Bm.

 

Thank you.

Steef 

Download All
0 Kudos
Message 3 of 9
(3,822 Views)
Solution
Accepted by topic author Steef

Hi Steef,

 

I need value from x-axe when y-value is equal to 0.

You have two arrays, one with X values, the other with corresponding Y values.

Search the X array for zero crossings and get the index of those zero crossings. (Hint: a ZeroCrossing is indicated by two consecutive values with different sign…)

Use these indices to get the corresponding value from your Y array.

To give an idea:

check.png

(Try to avoid DDT wires and ExpressVIs, they don't help to understand your own VIs!)

 

Next time you should use the AutoCleanup tool before uploading a VI… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(3,819 Views)

How I get this index?

Thank you for Autocleanup tool 🙂 I didn´t know that.

0 Kudos
Message 5 of 9
(3,815 Views)

And what kind of wires should I use?

I have problem with that, I don´t know "divide" that array - in loop I can´t  compare this number/numbers with 0.

0 Kudos
Message 6 of 9
(3,806 Views)

Hi Steef,

 

did you notice my snippet above?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(3,803 Views)

Hi GerdW,

yes, I do. But, can you sent me that file in VI? Thats could help me.

Thanks

 

Steef

0 Kudos
Message 8 of 9
(3,795 Views)

Hi Steef,

 

it's a snippet!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(3,792 Views)