06-07-2007 09:20 PM
Hi Gokul,
could ya try one more thing for me. Get rid of the trigger vi in the AO task and set the AO to use the AI sample clock. Make sure to set the AI task to use the onboard clock. I am curious about the synchronization when not using the trigger. Also, try flipping it around and set AO task to use the onboard clock and AI to use the AO sample clock. I am curious as to what phase error exists and if its different for the 2 cases. You might also want to try flipping the clocking in your current code using the trigger to start the AO. All should be quick and painless tests and I will be interested to hear the results.
Drew
06-07-2007 10:57 PM
06-08-2007 10:18 AM
Hi Gokul,
If you have a system in place that provides a constant phase relationship then you can simply do some shifting of the waveform to realign the phase. Again, if you are using a dual-phase lockin, that is multiplying the measured signal by the reference and another reference that is 180 deg out of phase (usually a sine and cosine waveform) and adding the results after LPF in quadrature, then the relative phase between your signal and the reference signals doesn't matter. A single phase lockin, on the other hand, needs the reference and measured signal to be in phase to maximize the signal.
Drew
06-10-2007 11:25 PM
06-11-2007 05:11 PM
Hi Gokul,
I would suggest checking out this thread, it is a very similar problem to yours with the differnce being multiple channel AI versus single channel. The last couple posts are particularly helpful in showing how to calculated how many points your measured phase lag refers to. I guess it would be impossible to identically measure the same signal for AI and AO when using the same clock since there will be some physical distance between the two and I don't know what kind of cabling you are using. At any rate, since you are measuring a constant phase difference the easiest thing to do will be to delete a point(s) from the beginning or end of the measured signal (depending on the sign of the phase shift) and do the opposite on the reference signal to maintain the same number of points in both arrays.
http://forums.ni.com/ni/board/message?board.id=250&message.id=30860
Drew