From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Speed up Triggered DAQ loop using NI cDAQ-9174 with NI-9215 and NI-9402

Solved!
Go to solution

Hi,

I am using LV2010 and NI-DAQmx 9.2.2. I have a NI cDAQ-9174 with an NI-9215 4 channel 100k simultaneous ADC and NI-9402 4 channel DIO module for triggering and reset.

We are running WinXP sp3 on a Dell M4400 core 2 duo @2.26Ghz.

I have used the example NI DAQmx code for Acquiring Voltage with HW trigger. My goal is to sample all 4 channels on the 9215 simultaneously when a trigger is received on channel 0 of the 9402, after the data is read out, I use channel 1 of the 9402 to reset the target hardware's trigger.  I have a version of this working, however the maximum rate of events is ~16/second.I have the 9215 setup for finite samples/ 10 samples per channel which is ~400uSec of conversion time and I realize there is overhead in calling vi's but ~50mSeconds worth?

The target detector can put out up to 1k/ event triggers/ seconds.  I was only getting a rate of 8/second and I added the NI-DAQmx control vi and chose "commit" this did double the rate.

My question is what is the max loop rate for these devices (trigger/conversion/ read out device/ reset) and start again? I noticed that just letting the 9215 free run using the "Acq&Graph Voltage Internal Clk" only raised the event rate to 20Hz.

 

Thanks,

normbo663

0 Kudos
Message 1 of 5
(3,837 Views)
Solution
Accepted by topic author normbo663

Hi normbo663,

 

You can get this to work much better assuming you have a counter available (there are 4 on the backplane of the 9174).

 

Compact DAQ supports "retriggerable" counter output tasks which can be used to generate a finite pulse train.  You can configure a retriggerable finite counter output task to be used as the sample clock for your analog input task.  The counter output task will be re-armed (within 12.5-25 ns) as soon as it is finished outputting the last pulse.  The analog input task would be configured to run continuously, but it would only sample based off of the triggered counter output.  For an example of this, see here.

 

You can reference the internal counters on cDAQ without routing the signals through a module by using: cDAQ1/_ctr0 (right-click on the counter channel control, then Select I/O Name Filtering, and check Internal Channels to add these options to the drop down).

 

 

So, with the above advice you should be able to immediately re-arm your analog acquisition on the 9215 by using one of the backplane counters.  It sounds like the second half of the applicaiton is to use a second channel on the 9402 to reset your DUT's trigger.  You can deterministically generate this signal as well by configuring a 2nd retriggerable counter output task (single pulse only this time).  All you would have to do is set the initial delay to the appropriate value to accomodate your analog acquisition.  Trigger this counter off of the same PFI line that you are triggering your analog task from.

 

By using counters to deterministically generate the signals you need, the loop rate no longer becomes a concern (as long as your input buffer does not overflow).  You might need to read back several triggers at once for your loop to keep up (e.g. read 1000 samples per loop, which would correspond to 100 triggers of 10 samples).

 

 

Best Regards,

John Passiak
Message 2 of 5
(3,832 Views)

Hi John,

 

Thank you for helping me out. I believe I have it working now. Your explanation was really clear.

 

Normbo663

0 Kudos
Message 3 of 5
(3,814 Views)

I've more or less the same problem, using a cDAQ 9178 and one NI-9222, but I'd like to retrigger the acquisition with an analog input signal instead of a digital one.

Is it possible? Is there a way to program a counter task in a such way that to trigger on an analog input?

I know I've the possibility to use the Commit-Start-Stop technique (examples\DAQmx\Analog In\Measure Voltage.llb\Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi), but using it doesn't assure me to catch all analog trigger.

 

Thank you for your help.

Paolo.

0 Kudos
Message 4 of 5
(3,744 Views)

The cDAQ can input an Analog Comparison Event from a module, but the 9222 cannot generate a Analog Comparison Event (analog triggering). The article Does NI CompactDAQ Support Analog Triggering? describes that you need at least one 9205 or 9206 on the chassis in order to perform analog triggering on the cDAQ chassis, and how to do it if you have one of those devices.

- Regards,

Beutlich
0 Kudos
Message 5 of 5
(3,718 Views)