From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculating phase difference of two signal from signal generator

I used two sinusoidal signals from signal generator. I want to calculate the phase difference between them. I apply the "fft" and the "complex to Arg" block in GNURadio.  the center frequency is 600 MHz and the sample rate is 8MHz. 
but when I run the flowgraph a window is opened for just 1sec and then it is closed and nothing else happens! I would be thankful if you tell me if there is somthing wrong. 

 

Thank you

0 Kudos
Message 1 of 5
(2,704 Views)

If the signals that you are wanting to know the phase difference between are sinewaves, it would seem to me that the phase difference is simply the delay between zero-crossing points or some other reference point.

 

Next, you are mention a flowgraph. Do you mean your program? What window is opened, and what does it say?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(2,688 Views)

I fixed that problem Mike. 

Thank you

the problem was that I had put 2 uhd sources block in my program instead of one source and two channels. 🙂 and also my signals are sinusoid. 

but now another problem is that the phase difference that is calculated is changing. I mean once it says 2.2 radian (which is correct since my inputs have 180 degree phase difference) and a few seconds later it changed to another number like 0.3 !!! and other numbers.

 

Thank you again for your help

0 Kudos
Message 3 of 5
(2,683 Views)

Please post your VI with some typical data saved as default (we do not have your hardware). It is very difficult to debug a paragraph.

 

Lynn

0 Kudos
Message 4 of 5
(2,680 Views)

If you plot the two waveforms as they are acquired, are they indeed 180 degrees apart? and not changing?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,676 Views)