Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

multichannel callback single task or multiple tasks

I'm attempting to read multiple analog and digital lines (Ex. 4 each) where each line has been created with a seperate task on a PCIe 6363. 

 

When I attempt to sample at 500kHz (80,000 samples per callback) the acquisition is fine. However when the sample rate is changed to 1Mhz an overflow error occurs (regardless of samples per callback).

 

How can I avoid the overflow issue and sustain a 1MHz sampling?

Should I combine the analog channels into a single task in addition to combining the digital channels to a single task?

Is there guidance/formula on how long the callback can execute before an overflow? We've been empirically determining where the sample rate and callback count fail.

 

0 Kudos
Message 1 of 5
(4,145 Views)

Hi Zeekial,

 

Overflow errors indicate that the (FIFO) memory buffer on your data acquisition card has reached its maximum capacity for storing samples. I would first try to change the IRQ mechanism to DMA transfer mechanism. Please read the following link. 

 

Understanding and Avoiding Overwrite and Overflow Errors with NI-DAQmx
http://digital.ni.com/public.nsf/allkb/A224DA0551EEA073862574F60060AB6F

 

Regards,

 

William Fernandez

Applications Engineer

National Instruments  

www.ni.com/support

 

0 Kudos
Message 2 of 5
(4,126 Views)

The PCIe 6363 is going to use DMA transfers for buffered analog input regardless of what you set for the DataXferMech.  The onboard FIFO really shouldn't be overflowing at a 1 MHz sample rate (2 bytes per sample on AI and 4 bytes on DI gives only 6 MB/s of data, the bus itself should be capable of at least 10x that).

 

What exact error are you getting?  I'd expect that it might indicate that your sampled data has been overwritten on your PC buffer.  If you're using default buffer sizes, your 1 MHz sample rate would only give you a 0.1 second buffer:

 

NI-DAQmx Help_2014-02-07_11-48-43.png

 

 

Assuming this is indeed the problem, you can resolve it by increasing the buffer size using DAQmx Configure Input Buffer.

 

 

Your analog input channels on your single 6363 have to be in a single task.  The digital inputs have to be in a single task as well (though a different task from the analog inputs) assuming they are being acquired using hardware timing.

 

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 5
(4,112 Views)

I am using 6363 to acquire multiple analog channels synchronized by ai/SampleClock, and read buffer out from all the channels with single callback function. When total channel number is more than 2, the callback function won't be honored but acquisition seemed to be functional without error. If total channel number is equal or less than 2, everything works perfectly. Is there any limitation on synchronous analog channels? Any help will be appreciated.

 

0 Kudos
Message 4 of 5
(4,097 Views)

In fact, the issue was on the AD convertor. I cannot drive multiple channels on this card with MHz frequency.

0 Kudos
Message 5 of 5
(4,026 Views)