Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected results when synchronising wave form generation and analog acquisition

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
0 Kudos
Message 1 of 3
(2,573 Views)
Most of NI DAQ devices use a single A/D converter and they multiplex the various inputs into that converter.

What you are seeing is the phase shift due to the actual samples of each of the channels being skewed in time.

You can adjust the inter-channel delay to minimize this effect but WATCH out for "channel" cross talk if your signal sources are high impeadence.

NI sells DAQ card capable of simultaneous sampling (6111 and the boards sold for sound and vibration apps).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,573 Views)
Thanks Ben

We expect phase shift and can account for that. What we are seeing is that if the channel being read back in is the second channel to be scanned, then the phase shift between successive calls to SCAN_Start is constant.

If it is the first channel to be scanned, then the phase shift changes between successive calls to SCAN_Start.

What we would like to know is why changing the scanning order of channels causes the phase shift to go from being constant between acquisitions to varying between acquisitions.

We'd expect that on the same system, the phase-shift would always be constant.

Thanks

Russell
0 Kudos
Message 3 of 3
(2,573 Views)