LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase difference measurement

Hi.

 

I am currently working a project based on synchronising two generators. I have obtained the Red phase voltage of both generators.I have also configured a Tektronix TDS2014b oscilloscope with Labview 2012 software and i would like to measure the phase difference between two waveforms using Labview.

 

Does anyone have any idea on how i can write a code to perform this task?

 

An example of the code could be helpful

 

Thanks

0 Kudos
Message 1 of 8
(5,660 Views)

Will this post help you? Please start on your own and then post your vi so that we can help you where exactly you got hiccups.

0 Kudos
Message 2 of 8
(5,628 Views)

Hi nirhirani94,

 

In addition to that other forum, check out the "Extract Single Tone Information" VI.  You can feed each waveform into instances of the VI and extract phase information.  From there, just subtract the resulting phase of the two measurements to find the phase difference. 

Matt | NI Systems Engineering
0 Kudos
Message 3 of 8
(5,610 Views)

Like so:

phasediff.png

In your case, you would change the sine waveform functions with your scope signals, build them into a waveform and pass them into the "Extract Single Tone.vi"

 

 

CLD | CTD
0 Kudos
Message 4 of 8
(5,582 Views)

Hi Mathan,

 

I have attached a copy of my Vi code below. I have tried the best I can however I wasnt able to get the phase difference. If you could please have look and try to find the possible reason fir the mistakes i might be doing in the code. And guide me on how i could correct this.

 

Thanks

Download All
0 Kudos
Message 5 of 8
(5,533 Views)

Try this..

 

Stay away from Express VIs, always use primatives or derive it yourself.. 

Not sure how it's calculating the phase, but this one (extract single tone), I've used before and it works fine.. Also, not sure in your original what the Phase is in units (degrees, rads)..

CLD | CTD
0 Kudos
Message 6 of 8
(5,516 Views)

Hi ChrisK88

 

I ran your program several times and Everytime i ran it it gave me an error. I have attached a screenshot of th error message. What does the error mean an how could i fix it?

 

 

0 Kudos
Message 7 of 8
(5,480 Views)

That is a problem with the communication to your instrument, make sure your GPIB/LAN/whatever communication bus you are using is properly addressed.

CLD | CTD
0 Kudos
Message 8 of 8
(5,463 Views)