Archived:Seeing Spikes on Multiplexed Analog Input

Updated Oct 14, 2022

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Hardware

  • PCIe-6343
  • PCI-6229
  • PXI-5122
  • sbRIO-9637

Driver

  • NI-DAQmx

Issue Details

I've connected my signal source to two devices: multiplexed analog input and a secondary data acquisition device. I'm reading in from multiple channels, and will see random spikes in my signal. Why do I see small high frequency spikes at every convert clock edge on my secondary data acquisition device (DAQ)? 

Solution

This behavior is referred to as glitching. To eliminate glitching completely:
  • Disable multiplexing on a board by sampling a single channel.
  • Migrate to a different data acquisition device that does not multiplex the channels.
  • Synchronize the "other" DAQ device with the multiplexing analog input.
    • This ensures that samples are taken after the device has been switched and not during a switch.

Additional Information

Glitching happens due to the noise that occurs when the multiplexed analog input is switched between channels. This is more present in a system where the voltage on each channel of the multiplexed DAQ varies by a large amount.

The following setup demonstrates this problem:

Devices: PXI-6229 and PXI-5122
Connections: AO0 and AO1 were connected to AI0 and AI1, respectively. Also, AO0 and analog output ground were connected to ch0 of the NI PXI-5122. 
Signals: AO0 was set to generate a 30 Hz square wave at 1Vpp and AO1 was set to generate a 30 Hz square wave at 15 Vpp.

The acquired signal from the PXI-5122 (shown below) at a 50 MS/s shows the larger glitches 1 ms apart. These glitches make sense for a 1kHz sampling rate (period of 1 ms), but one might expect to see two glitches due to the fact that there are two channels in the analog input task. One should see two glitches. If zoomed in closer, another small glitch would be apparent at one over the convert-clock apart from the larger spike.

With DAQmx 7.4 and later, the AI convert clock is set to be the fastest rate possible based on the speed of the ADC while adding 10 μs to account for settling time requirements. This is mentioned on page 77 of the M Series User Manual linked below. 

To show the two spikes more explicitly, you can force the convert clock to be 10KHz using the AI Convert Clock Rate property node. You may notice above that there are two glitches 0.1ms apart (1/10KHz = 0.1ms).  

To eliminate the glitching completely, disable multiplexing on a board by sampling on a single channel, or, alternatively, migrate to a different data acquisition device that does not multiplex the channels. Another solution would be to synchronize the "other" DAQ device with the multiplexing analog input. This ensures that samples are taken after the device has been switched and not during a switch.