In some circumstances, when using a multiplexed multifunction DAQ device it may be desirable to acquire from a single channel at a time, but use the multiplexer to switch between channels only after a certain number of samples have been acquired on each channel. This example shows how to configure a Multiplexed multifunction DAQ to operate in this manner--you can think of it like a switch combined with a single channel data acquisition device.
The key is that you can scan the same channel multiple times in a scan list--the program takes advantage of this and builds a task with multiple copies of each desired channel. This way we can configure the amount of samples we want on each channel, and multiplex to the next channel on the very next convert clock pulse. The sample clock is used as a "trigger" signal to start the entire acquisition over again. You may use an external digital trigger if desired to re-start the acquisition, but you would have to configure this as your sample clock (NOT as a trigger).
This is a VERY specific use case for DAQmx, so for more general examples you should take a look at the shipping examples in the LabVIEW Example Finder.
LabVIEW 2009 or compatible
NI DAQmx 9.1.5 or compatible
Any DAQmx-supported hardware that multiplexes samples to a single ADC (M Series, some X Series).
Steps to Implement or Execute Code
Set channel scanning parameters.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**