05-14-2025 12:28 PM
Hi, I'm new in LabView and I have a problem with my project, I'm emulating a FFM generating two sines, this part works amazing because I have the gap that I want, the problem is with the acquisition, I have to obtain the gap of this sines and convert it into a voltage, I tried to read the gap with a "zero crossing VI" that I found in the forum, the problem is that I don't know how to convert this gap into a linear voltage.
05-14-2025 05:50 PM
Can you define your use of the word "gap"?
05-14-2025 11:25 PM
I'm trying to refer to the phase difference of both signals
05-15-2025 09:57 PM
Go through the exercise of defining the transformation you need to achieve.
What is the minimum value of phase? -360, -180, 0 deg or something different?
For the minimum phase, what is the expected output voltage?
For the maximum phase, what is the expected output voltage?
How would you math it by hand?
How would you write the function in pseudo code?
What values will you use to test your function?
When you have gone through the exercise of defining your requirements, attach your detailed requirements or even a prototype subVI to convert phase to voltage, and we will help you iterate.
05-17-2025 09:35 AM
The question you pose in the Subject line is fairly simple to answer (in principle) -- take "enough" samples of the two signals to capture a cycle of each sinusoid, find the location of the peak of each, subtract, and convert to a voltage.
What isn't answered? What are the characteristics of the signal (frequency, amplitude, how much "noise" is present (including digitizing noise), etc. Also, you might know that you really don't want to "find the peak", but rather "find the rising (or falling) mean-crossing time" (as that's the point of steepest slope of the signal).
Also, what are the "timing" requirements of your task? How stable (or possibly how variable) are your signals? Are the sinusoids time-varying (in amplitude, frequency, and/or phase)? How closely (in time) to you need to analyze the phase difference between the two signals?
Bob Schor