Showing results for 
Search instead for 
Did you mean: 

High sample rate for 18 channels in single task - DAQmx

Go to solution

Hi there


My current experiments require acquisition of 18 channels (6 AI Custom Voltage with Excitation, 12 AI Voltage) of data at a sample rate of 50kHz. My question is if this is faesible using a single cDAQ-9172 chassis. The modules being used are 2 x NI 9237 and 4 x NI 9215.


The previous researcher on this project used 2 different DAQs to do this, but I was hoping I could reduce it down to a single DAQ to simplify synchronisation of all the channels. 


I have written a *.vi (attached) to do this and write to a TDMS file using a producer-consumer structure; however, when I run the *.vi, I can leave it to run for minutes, but the number of samples recorded to the TDMS are rarely more than 100k. Eventually a buffer size error occurs (trying to read samples that have been overwritten) with less than 200k samples ever recorded. I checked the max sample rate (using a timing property node) with the task configured as in the *.vi, and it indicates a max of 235kHz. 


I cannot tell whether I am just doing the producer consumer structure incorrectly or if I am asking too much of the single cDAQ-9172?


Any help would be very much appreciated.






0 Kudos
Message 1 of 4


First off, the NI 9237 specs say 4 channel and rate limitations : 50k samples /s /channel so if you want to acquire with this module à 50kHz you can only use 1 channel, for 2 channels max rate will be 25kHz, and for 3 and 4 channels I'm not sure you can simply divide 50kHz by 3 or 4, it might be a bit less than that.

The NI 9215 specs say 100k sample / s / channel and has 4 channels, so if you want 50kHz you can only use 2 channels on it.


I've never used cDaq so i'm not going to speculate too much on what's the best option for you.


One mopre thing though, I've had a quick look at your VI, just a trick, you could save a lot of diagram space by adding channel by bulk instead of one by one :




hope this helps

We have two ears and one mouth so that we can listen twice as much as we speak.


Antoine Chalons

0 Kudos
Message 2 of 4
Accepted by bart.s

Hi bart.s,


TiTou is talking about aggregate sampling not simultaneous, thus sampling rate 50kS/s is same for all channels.


I see problem in the producer loop. If your sampling rate is 50kS/s/ch and you are reading only one sample/ch you will lose data because the producer loop cannot run so fast. You should read more than one sample. I also recommend you to move your plotting code to consumer loop and work with bigger amounts of data.


The second problem can be with error handling in your consumer loop. Merge errors from consumer and producer loop and also add some general stop for both loops if error occurs (for example using local variable).


Best regards,




0 Kudos
Message 3 of 4

Thanks for the replies 🙂


I think I have it working now



0 Kudos
Message 4 of 4