LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cDAQ 9172 Sampling Rate

Solved!
Go to solution

I am using a 9172 cDAQ with modules NI 9219, NI 9264, and three NI 9211.  I am attempting to acquire signals off of the DAQ within a loop under continuous sampling.  My program works great if I set the number of samples to read to 1 at 2 Hz, but I need it to go faster than that.  If I change the sampling rate the loop executes at that speed but the sensors are still only reading in samples at 2 Hz and then duplicating over and over again.  I was wondering if it was possible to read out 1 sample at a time from the DAQ at a faster rate.  I know the sampling rate on the sensors and the DAQ are much higher than that.  Does 1 sample at a time from the board have the limitatioins of only being able to execute at 2 Hz?  Please let me know

 

Thanks

Craig

0 Kudos
Message 1 of 4
(3,451 Views)

Hi Craig,

 

You can use the AI.ADCTimingMode property to configure the NI 9219 to return 100 samples per second. Here's how: How to Set the Sampling Rate of the NI-9217/9219

 

However, the NI 9211's ADC timing mode is not configurable. The NI 9211's maximum sample rate is about 14.29 S/s / (# of channels), and autozero and CJC count towards the number of channels. You can speed it up slightly by setting AI.AutoZeroMode = Once and AI.Thermcpl.CJCsrc=Constant Value, but this only gets you to 3.57 S/s for a 4-channel task.

 

How fast do you need it to acquire?

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 4
(3,429 Views)

Brad,

 

Thanks for your response, but I still have a couple of questions.  I looked at your attached file and saw that i can adjust the NI 9219 which is really all I need to do.  Within the loop I have all of the DAQ outputs wired to the same express VI so I was wondering if there is a way to wire the AI.ADCTimingMode to just the NI 9219 Module within the express VI.  Right now I have the task out of the DAQ ouput express VI wired to the Task in of the DAQmx Channel and I have the constant 14712, found in LabVIEW help, wired to the AI.ADCTimingMode input.  I get the error that the thermocouple module cant be altered just like you said would happen.  Do I need to split the express VI and do I have the DAQmx wired correctly.  These may be silly questions, but I do appreciate the help.

 

Thanks!

Craig

0 Kudos
Message 3 of 4
(3,411 Views)
Solution
Accepted by topic author cnetemeyer

Hi Craig,

 

I'm not exactly sure what you're describing. Are you feeding the output of DAQmx Read into an express VI? Or are you using the DAQ Assistant express VI for the analog input task?

 

If you're using the DAQ Assistant, you can set the ADC timing mode without changing your code:

 

 

If not, use the "Active Channels (if subset)" property to control the subset of channels on which your VI sets the AI.ADCTimingMode.

 

For example, the following snippet creates 8 virtual channels named myVoltage0 through myVoltage7, and sets AI.ADCTimingMode on virtual channels myVoltage4 through myVoltage7. These correpond to physical channels cDAQ1Mod2/ai0 through cDAQ1Mod2/ai3:

 

23758i79F81C6A9F7B94DD

 

If you leave off the "name to assign" input on the create channel VI, then the virtual channel names are the same as the physical channel names, so this is equivalent:

 

23760i34FB5EF6DC51C1EC

 

And by the way, right-clicking on the property and selecting "Create >> Constant" from the context menu keeps you from having to hardcode numbers like 14712.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 4
(3,405 Views)