This phase shift or delay is typically the result of the group delay of the anti-aliasing filters common in the front-end of devices with Delta-Sigma-ADC.
You can compensate for this group delay in several ways:Option 1: Channel Expansion
If the two devices can be used in a single task using Channel Expansion and
the devices supports Filter Delay Removal
, driver will compensate for the delay automatically. The caveat is that the modules will need to sample data at the same rate.
Using Channel Expansion with devices that don't support Filter Delay Removal like C Series devices, PXI-4461/4462 or PXI-447x modules will synchronize the devices, but will not remove the filter delay.Option 2: Using the RemoveFilterDelay Property
If the devices cannot be used in a single task (i.e. if you need different sample rates) and
the DSA device(s) support Filter Delay Removal
, such as with the PXIe-4464, you can use the AI.RemoveFilterDelay
property (DAQmx Channel Property Node: Analog Input»General Properties»Filter»Remove Filter Delay
) to automatically discard filter delay samples.
Option 3: Manual Compensation
If the two devices cannot be used in a single task and Filter Delay Removal
is not supported, such as with C Series, PXI-4461/4462 or PXI-4472 modules, you can compensate for the delay manually by performing a dummy read on the DSA channels and throwing out a certain number of initial samples on the DSA device, prior to reading the samples from both devices simultaneously, as shown below:
The number of samples to read and throw out can be determined experimentally, or by reviewing the the group delay or filter delay equations or tables found in your DSA device's specifications documentation.Option 4: Using Analog Triggering with DSA Devices
If you are using analog triggering to start the DSA device task, the filter delay will not be observed, since the analog trigger circuit comes after the anti-aliasing filter; this prevents aliased components of the analog signal from firing the trigger.