Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

low sampling rate using NI cDAQ 9172 with NI 9205

I'm using NI cDAQ 9172 with NI 9205 to measure 32 channels voltage data from components of computer.
The configuration in NI 9205: 100 samples to read, and 1k Rate (Hz)

32 channels are measured based on differential pairs method.
Therefore, ch0 = AI0 -AI8, and ch1 = AI1 - AI9, and so on ...
And we are interested in output of ch0, ch1, ... ch7, ch16, ...ch23, which are totally 16-channel results we're acquiring at a time.

The problem we have now is that although we set the parameters of 100 samples to read, and 1k Rate (Hz) in NI 9205,
we actually get only like 3~4 samples per second. This is far from we were expected.
Is there any way to improve the sampling rate?

The attachments are our Labview diagram as well as the configuration of NI 9205.

Does anyone have same experience about this?
Any comment will be appreciated.

Thanks,
Hung-Ching



Message Edited by Elson on 03-21-2008 04:38 PM
Download All
0 Kudos
Message 1 of 5
(3,560 Views)
Hi Elson,

I got a few questions / suggestions that might help you out.  First, are you saying that you are getting a total of 3-4 sample or 3-4 chunks of 100 samples?  If you're getting 3-4 chunks of 100 samples it might just be that your loop rate that is calling the DAQmx read isn't going fast enough.  This might also end up in a buffer overflow problem.  I would recommend either setting up some type of timing to determine your loop rate or increasing the number of samples to read.  The sampling rate that you set on your card specifies how fast the card is taking samples on the card and storing them in onboard memory.  The rate you call the DAQmx read and the amount of samples to read will both affect how fast you development enviroment (LabVIEW, Visual Studio, etc.) gets updates with the samples from your card.

If you could clarify a bit more how you are verifying that you are only getting 3-4 samples, that would help me determine if you have a problem with your card.

Regards,
Paul C.
0 Kudos
Message 2 of 5
(3,511 Views)
Hi Paul,

I'm getting 3~4 chucks of 100 samples per second that I was expected.
The sample rate I verified was by using the write-to-measurement-file component to write 16 channels mesurement data in a file to the disk.
I thought this might be the file I/O latency problem, but, when I removed the write-to-file component in labview code, the waveform monitor still shown 3~4 chucks per second.

I tried to increase the rate to call DAQmx from 1k Hz to 7k Hz, and I got faster sample rate of 6~7 chunks of 100 samples.
Please see the attachment DAQ_config.jpeg for the DAQmx configuration and voltage_all_channels.txt for the output file

In addition, I also tried to increase number of samples to read in the DAQ configuration, but this didn't increase the sample rate.

I appreciate your suggestions on this!!

Thanks,
Elson
Download All
0 Kudos
Message 3 of 5
(3,500 Views)
Hi again Elson,

I apologize, I didn't see your pictures in the first post.  The reason you are only getting a few chunks of 100 samples is because you are doing an N-sampled acquisition each iteration of the loop.  If you want to continuously acquire at a specified rate you will need to selection Continuous acquisition.  I've gone ahead and attached some pictures of my setup.  With Continuous acquisition, you're not having to spend time to reinitialize the task every iteration of the loop which slows down the actual acquisition and creates gaps between when each sample chunk is started and taken.





Regards,
Paul C.


Message Edited by Paul C. on 03-24-2008 02:01 PM
Download All
0 Kudos
Message 4 of 5
(3,486 Views)
This works!!!
I'm now able to acquire 100 samples per second in the way you suggested.

I'm really appreciated your help.

Thank you very much!!

Elson
0 Kudos
Message 5 of 5
(3,474 Views)