Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with time critical sampling using cDAQ-9172, NI 9205, NI 9403, and LabView

Hi,

 

I have an application where I need to trigger sampling with an external line and I cannot tolerate more than 0.3ms of latency.  I'd like to somehow remove windows and labview from this part of the design.  

 

I have a compact DAQ chassis, (cDAQ-9172), and an ADC and I/O module, (NI 9205 and NI 9403 respectively).  I'm using LabView 8.6 Full.

 

I'm taking data from a sensor that's mounted to an xy stage.  The controller for this xy stage will provide a trigger signal to be picked up with the NI9403.

 

When the trigger line is high, I want the NI9205 ADC to sample continuously at 15kHz.  

 

When the trigger line goes low, I want sampling to stop and all of the collected samples to be averaged and stored to a file.  

 

The sampling duration will be approximately 6.3ms but is not constant.  ~100 samples.  

 

The line will go high again and the process will repeat within 0.6ms.

 

My main concern is that there will be too much latency with windows and labview between the time it takes labview to recognize the trigger, apply logic, and command the ADC.  I would like to take windows and labview out of the sampling loop.  I'm told I may be able to do this using the cDAQ on board timers with the NI modules placed in specific slots.  

 

I cannot afford, (time or money), to consider using the real time module in labview or different hardware.

 

I'd appreciate any suggestions on how I may be able to accomplish this.  Any examples using the chassis onboard devices to control the modules to minimize latency would be great.  Thanks in advance.

 

Jason 

0 Kudos
Message 1 of 3
(3,736 Views)

It sounds like you want to use a pause trigger.  This mode uses an external signal to gate your sample clock.  The only problem with your current setup is that the trigger source cannot come from the NI 9403, as it cannot directly route the trigger signal to be the pause trigger source.  With the cDAQ-9172 any of the digital modules with 8 or less lines in slot 5 or 6 can input the trigger you want.

 

You would configure this by setting up your 9205 AI task as normal while setting the trigger type to be pause trigger.  It sounds like you are using LabVIEW so you might want to look at a few of the pause trigger examples, such as "Cont Acq&Chart Samples-Int Clk-Pause Trigger.vi".

0 Kudos
Message 2 of 3
(3,724 Views)

Also, the NI 9205's "PFI0" terminal can be used as a trigger source, no matter which slot the NI 9205 is in. You should be able to set the trigger source to "cDAQ1Mod1/PFI0" on the front panel of the example VI that Mark referred to.

 

Brad

---
Brad Keryan
NI R&D
Message 3 of 3
(3,711 Views)