11-22-2019 01:33 AM
Hi, I am using recent versions of NI-DAQmx (e.g. v19). We have been using a multitude of NI data acquisition boards over the years, but after reading all available documentation I have not been able to find an answer to a new requirement at my company: How can I acquire multiple voltage samples for each received external trigger event?
In my concrete application I want to acquire AI values. An external digital trigger is to be set up using a PFI terminal. With each trigger event at this PFI terminal we would like to acquire, say, 20 AI voltage samples (of a single AI channel), using an internal timer sample trigger. The external trigger events are expected to arrive with a rate of ca. 10.000 / s. Is it possible, using NI DAQmx features, to produce (on a NI DAQ board) a time-equidistant internal sample trigger pulse train of finite length for each received external trigger? Which DAQ boards, if any, do support this feature?
Solved! Go to Solution.
11-22-2019 08:46 AM
X-series boards (63xx) will support finite retriggerable acquisition directly. So would some other devices based on the newer STC3 timing chip as well, but I don't know the list.
Many older multifunction boards supported it indirectly by setting up a counter task as a finite retriggerable pulse train that an AI task used as its sample clock. Here's a good example.
There's one other sneaky trick that is probably supported by just about any multiplexing AI device. A multiplexing device uses 2 clocks for sampling, the sample clock and the convert clock. For each sample clock pulse, there are typically multiple convert clock pulses -- one for each channel in the task as the convert clock drives the multiplexing switch.
Another fairly little-known tidbit is that you can create an AI task whose channel list is just the same channel repeated many times. Now let's bring these two things together.
Create a task with a channel list that repeats ai0 20 times in a row. Configure the task to use the external signal as the *sample* clock. DAQmx will be able to figure out an appropriate rate for the convert clock if you *accurately* identify the frequency of the external clock. It's also possible to explicitly configure the convert clock using a DAQmx Timing property node.
-Kevin P
11-22-2019 08:54 AM
Whoa, cool, thanks a lot for the pointers!