Synchronizing Delta-Sigma Analog Input Modules Using Compact DAQ and CompactRIOHardware: CompactRIO>>Analog Input Modules>>NI 9233, CompactRIO>>Analog Input Modules>>NI 9237
Problem: I have a mix of 12, 16, and 24-bit (delta-sigma) resolution Analog Input modules in my cDAQ-9172 chassis. I would like to synchronize the measurements from the modules, however when I try to do this by placing them in a single task, I see a noticeable offset between the waveforms. How can I synchronize my measurements so that the waveforms align? Solution: The 24-bit resolution Analog Input (AI) cDAQ modules use a delta-sigma converter and an oversample clock to read the analog data. There is an inherent input delay due to built-in analog and digital filtering. If the module uses simultaneous sampling, each of the channels on the 24-bit module will be synchronized. However, if you are also reading from an AI module that has a lower resolution there will be a finite offset between the 24-bit resolution module and the lower resolution module. The delta-sigma input delay can be found in the User Guide and Specifications for the 24-bit module(s), which are linked below. For example, for sampling rates (fs) at or below 25kS/s the NI 9233 has an input delay of 12.8/fs. For faster sampling rates, the delay is 9.8/fs. Refer to the specifications for the valid data rates available for the internal sample clock. To align the signals for analysis or display, you can shift the signal(s) by replacing the t0 of the waveform(s) by an amount equal to the offset. In LabVIEW, you can replace t0 of a waveform using the Get Waveform Components and Build Waveform functions. The code in Figure 1 demonstrates how you would use these functions with the NI 9233:
You could perform a similar operation using the input delay formula for any other module. Here is a before and after example of how your signals may look:
As shown in Figure 2, the subtraction of filter delay from the t0 of the DSA waveform is most helpful when plotting DSA and DAQ waveforms simultaneously. If saving the waveforms to file is most important, then removing samples is the most effective solution. For example, assume the filter delay is 12.8/fs and X is the amount of samples that occured during the filter delay. To properly align the waveforms, the first X samples need to be removed from DSA Waveform while the last X samples need to be removed from the DAQ waveform. Related Links: Product Manuals: C Series Manuals KnowledgeBase 4DAEUNNQ: How to Compensate for Different Group Delays with C Series Modules in LabVIEW FPGA Attachments:
Report Date: 11/20/2006 Last Updated: 11/03/2008 Document ID: 43J65CAY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
