04-22-2009 07:18 AM
Dear all,
I am trying to measure the frequency and phase of a square wave from a DAQ card using Extract Single Tone Information vi. So far the frequency could be measured correctly but there is some problems with the phase measurement.
I have attached a sample program here. I generate the square wave using Square Wave PtByPt vi. The default sample size is 1000. When I set frequency = 7.43, phase = 80, the frequency could be measured correctly but the phase is completely out. Is there anything wrong with my program?
Thank you very much for your help.
Best regards
Solved! Go to Solution.
04-22-2009 07:45 AM
A square wave is not a single tone 😉
If you have a square wave use the edges to do measurements.
04-22-2009 09:59 AM
Thank you Henrik. it is possible to do it that way.
Another problem is that I need to measure the phase difference between a square wave and a sine wave from a DAQ card. They are expected to have the same frequency. For sine wave, I guess it could be done by the Extract Single Tone vi but for the square wave, do I need to do the manual calculation and compute the phase difference? Is there any other ways to accomplish that?
Thanks for the help