LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling rate for multiple modules in cDAQ 9174

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!

0 Kudos
Message 1 of 6
(973 Views)

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.

0 Kudos
Message 2 of 6
(966 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 6
(945 Views)

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?

0 Kudos
Message 4 of 6
(939 Views)

@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.

 

Snap136.png

0 Kudos
Message 5 of 6
(933 Views)

Thank you Mcduff! 

 

I'm gonna try the examples as you recommended...

0 Kudos
Message 6 of 6
(925 Views)