Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer rate of high-speed sample acquisition from DAC to PC.

 
I am using a PCI 6321 to run a scanning microscopy setup and would appreciate some advice on a technical issue with timing the DAC for acquisition (output).
 
I need to acquire 40,000 samples from 3 Analog Input channels at a sample rate of 5 kHz. I understand that the DAC can only hold ~4000 samples in the buffer at a time, so they need to be transferred to the computer to empty the buffer before I accumulate more data points. So, my plan is to have the DAC continuously recording samples and then transfer the whole set of data points every 4000 samples. My concerns here is that I don't know how long it takes the DAC to transfer the data to the computer. Would it take longer than the 200 microseconds I have in between data points to transfer the data and then get prepared for the next set of 4000 samples? Or would I be able to continuously run and not miss any samples? Is this the same speed as uploading points onto the card to use for the AO channels? I am using an external clock for the data acquisition.
0 Kudos
Message 1 of 5
(116 Views)

This is called streaming, and in terms of DAQ, you need to continuously read in chunks of 100ms of the sample (rule of thumb). The good thing is that DAQ implements DMA, thereby it can directly write to computer memory locations.

 

In general, streaming 3 AI channels at 5kHz is not a challenging task at all. Please share your code to ensure you're following the best practices.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(98 Views)

Hello Santhosh,

 

Thank you for your response. Would this vi be able to read every sample at 5kHz?

0 Kudos
Message 3 of 5
(60 Views)

Your implementation cannot keep up as you're reading 1 sample at a time which is too slow.

santo_13_0-1738974557677.png


If you just need to collect the data, FlexLogger will make your life easy as it is configuration based data acquisition.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 5
(52 Views)

Look at https://forums.ni.com/t5/Multifunction-DAQ/Buffer-size-limitations-in-finite-acquisition-best-way-to...

 

It is explaining the real-time constraints in a streaming case with examples in python and VI,. where you process data live through callbacks.

As mentioned by santo_13, if you just need the samples, there are better ways.

 

For example, I process measurements live to display them on a screen. And I also use APIs to acquire data and post-process later, thus I don't need callbacks in that case

Message 5 of 5
(24 Views)