We are using a 6052E to generate a single waveform (a square wave) and at the same time perform dual channel acquisition. The generated waveform is a reference wave that is read back in. The second channel is an externally generated signal that we read in.
We are running using a clock of -3 (50ns intervals) and an interval of 75 which gives a sample rate of roughly 266666.67 samples/second.
We have setup the analog acquisition to synchronise with the waveform generation by enabling the PFI_5 line which works fine.
Currently the waveform is going out on analog out 0. It is begin read back in on analog in 0. The second signal is being read back in on analog in 1.
The waveform buffer is 8 points (-5,-5,-5,-5,+5,+5,+5,+5) which gives a frequency of ~33kHz.
As the input and output are synchronised, the input for the signal is effectively running at half the speed of the generation so we get 4 points back per sample (-5,-5,+5,+5). Also, there is a small amount of shift between what is generated and what is acquired. We get back sequencies of something like
+5,-5,-5,+5. This is fine because we can work out what the shift is and know exactly the phase shift of the signal coming back in.
But it doesn't always appear to be the same amount of shift.
If the reference signal comes in on channel 0, and the other signal on channel 1, then the shift is constant providing the input channels are scanned in the order 1, 0 (well, the numbering doesn't matter, providing the reference signal is read back in on the second channel to be scanned, not the first).
If they are scanned in the order 0, 1, then the shift varies between subsequent starts of the synchronous AI/O. Why is this?
We were hoping that because of the synchronisation, the phase shift would be constant from what is being generated to what is being acquired.
Should it be? Have we just been lucky that when the reference signal is scanned as the second input channel, the phase shift appears constant, but when scanned as the first channel, the shift can vary.
Once the acquisition has started, the phase shift doesn't change. We get back a nice repeatable pattern, but when can changing the order the channels are scanned in, produce random changes in the phase shift?
Can we ever rely upon the phase shift being constant between subsequent acquisitions or not.
What we will be doing in the end, is 2 channel waveform generation, and single channel acquisition. The high frequency generated waveform will be mixed with another signal and read back in. We want to know the phase shift between what is being generated and what is read in, so we can eliminate the signal we generate from it and be left with the external signal. Is this ever going to be possible, or will we end up having to read in the original reference signal and the mixed signal to eliminate it?
Thanks
Russell Hind