04-12-2022 01:40 PM
Dear experts,
I am trying to do some data acquisitions with a cDAQ chassis NI-9174. I have two different card in the chassis, one is NI-9239 (50kS/s/ch) and another is NI-9220 (100kS/s/ch). I tried using one single task to acquire data from channels on both of the cards, setting a sample clock for continuous samples, and then setting up a NChan NSamp acquisition for 1000 samples each loop. However, I couldn't get the 50k sampling rate for all the channels. I got the onboard memory overflow Error -200361: "Onboard device memory overflow. Because of system and/or bus-bandwidth limitations, the driver could not read data from the device fast enough to keep up with the device throughput." I can only go to a sampling rate around 25k. I though "When a slow sampled device is grouped with another device in a task in a multi-slot chassis, the system will operate at the requested sampling rate, even if this rate is above the maximum sampling rate specified for the slow sampled device.' What did I do wrong?
Thank you very much for your help in advance!
04-12-2022 02:15 PM
You should really post your VI, not a small screenshot.
My guess from your small screenshot is the following: In your Read Data Loop you may be reading too few samples at a time (a good rule of thumb is to read 100ms worth of samples), you are processing the data in the same loop you are reading it (the processing may take too long, do the processing in another loop.)
I can grab 4 channels at 1 MSa/s in a cDAQ chassis no problem using the advice above.
04-12-2022 04:59 PM
Reading too few samples in the loop might *also* be a problem, but the specific error message mentioned is pointing to a failure of DAQmx to move data from the device to the PC over the USB bus. (Note to the OP: reading an appropriate # samples per loop is a very good tip, but I wouldn't expect it to fix the specific error you have now.)
I don't use cDAQ much, my main thought is to wonder if you're on a hub to make you share bandwidth with another demanding USB device. Note that even the USB ports built into the PC are often internally part of a hub, though they're a bit less prone to being problematic about such things.
-Kevin P
04-12-2022 05:44 PM
Thank you Kevin! Yea, increasing more samples each loop didn't solve the problem. Also, I don't have any data processing going on in the loop other than putting them in a queue.
The chassis is plugged into the USB port on the PC, but that is an interesting thought. Maybe I should try another computer just to see if the error goes away? On the other hand, I have found that, if all the channels are from NI-9220, even from two NI-9220 modules on two slots, the program runs with no problem. The error only happens when one or two of the channels are from NI-9239 and the others from NI-9220, so maybe it is to do with the timing or maybe synchronization between the two modules?
04-12-2022 05:58 PM
@dienosong wrote:
Thank you Kevin! Yea, increasing more samples each loop didn't solve the problem. Also, I don't have any data processing going on in the loop other than putting them in a queue.
The chassis is plugged into the USB port on the PC, but that is an interesting thought. Maybe I should try another computer just to see if the error goes away? On the other hand, I have found that, if all the channels are from NI-9220, even from two NI-9220 modules on two slots, the program runs with no problem. The error only happens when one or two of the channels are from NI-9239 and the others from NI-9220, so maybe it is to do with the timing or maybe synchronization between the two modules?
Try one of the examples using the Example Finder; you can make a multi-module task with the examples. If that doesn't work, then maybe something wrong with the USB.
You are scaling the channels in your loop, which shouldn't take long but without seeing your whole loop hard to help.
Hard to believe it is a USB problem as data rates are slow. Below is a simulation of 2 9239s and 2 9220 in a cDAQ 9174 chassis, all channels on, 50kSa/s, the data rate is 7.6MiB/s, about 1/4 of a USB 2 bandwidth.
04-12-2022 08:01 PM - edited 04-12-2022 08:54 PM
Thank you Mcduff!
I'm gonna try the examples as you recommended...