Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

retriggerable analog data acquisition without restarting the AI task

I would like to acquire finite amounts of new data repetitively on an AI channel upon each digital trigger. I am confused whether I should configure the AI channel to use Advance Trigger, Handshake Trigger, or Arm Start Trigger. All of these triggers seem to work only for one-time (not retriggerable) acquisition . I don't want to restart the AI task for each trigger because the trigger comes at about 50 Hz and restarting the AI task may take longer than 20 msec. I am using M-series board (USB-6259), Visual Basic/Measurement Studio, and NIDAQmx. An example in any language (VB, C, C++, LabView) or just a general guide would be appreciated.
 
Victor
0 Kudos
Message 1 of 4
(3,815 Views)

The usual guideline goes like this:  Configure your AI task to use one of your counter outputs as its sample clock.  Then configure the counter for retriggerable finite pulse train generation.  In LabVIEW, the retriggerable property is found under the DAQmx Trigger property node.

Each trigger signal will cause your pair of counters to generate a finite # of pulses that are used to take AI samples.

Note however that your AI buffer will *NOT* keep track of the fact that you've got delays between bursts of samples.  Suppose for example that you take 100 sample bursts at 100 kHz.  The 1st 100 samples will have 1 msec spacing, then there will be a 19 msec delay before sample 101.  You will need to keep track of this fact in your app software if it matters to your needs.

Check out this page and note that it references a shipping example to do exactly this kind of thing.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 4
(3,808 Views)
Setting a counter as a clock source for AI task is a nice and easy solution, thank you. However, I am already using both counters for other purposes, so I am stuck with using the internal clock for AI task. Can I use  Advance Trigger, Handshake Trigger, or Arm Start Trigger to make my AI task retriggerable?
0 Kudos
Message 3 of 4
(3,799 Views)
As far as I know, finite retriggerable acquisition can only be done using counters.  I'm not familiar with the Advance trigger, but I'm pretty sure that neither the Handshake nor the Arm Start trigger can be used for an AI task.  Note that with some such DAQmx properties, you won't see the error cluster asserted when you first write the property -- it'll show up when you try to start the task.
 
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(3,795 Views)