From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer Size USB 6009

I am new with NI and Labview. In my application,  the sampling rate is 20 kHz. With 14 bit resolution the sample size for 2 seconds will be 70KB. The FIFO buffer on the USB 6009 is of 512 Bits. I can't reduce the sampling rate. What can be the possible solutions:

1.    Can I somehow, increase the buffer size?
2.    Or I have to go for real time data transfer to PC using realtime LabView?
3.    Or have to change hardware?

Zaidi

0 Kudos
Message 1 of 4
(9,064 Views)

Hello Zaidi,

The USB-6009 has an AI FIFO size of 512 bytes and max sample rate of 48kS/s. The USB-6009 also uses the USB 2.0 Full-Speed specification which has a bus speed of 12Mb/s for data transfer. You cannot increase the size of the onboard FIFO, but you should not need to for your application. As you are acquiring data, the DAQmx driver will be transferring the data from the device into your PC memory continuously. Therefore, you will not need to store all 70KB of your data on the board at once. Instead, this data will be placed into your PC memory while it waits to be copied into your application (such as by the DAQmx Read function). For more information on how this process works, please refer to the NI-DAQmx Help section for Buffering, found in NI-DAQmx Help » NI-DAQmx Key Concepts » Reading and Writing Data » Buffering. Specifically, the section titled “How Is Buffer Size Determined?” may be helpful in explaining how the size of the PC buffer is determined and how you can control the buffer size. Hope this helps,

Daniel S.
National Instruments
Message 2 of 4
(9,045 Views)
thank  you very much Daniel. I went through the information contained in the help. but i am kind of confused. It says

"If your acquisition is finite (sample mode on the Timing function/VI set to Finite Samples), NI-DAQmx allocates a buffer equal in size to the value of the samples per channel attribute/property. For example, if you specify samples per channel of 1,000 samples and your application uses two channels, the buffer size would be 2,000 samples. Thus, the buffer is exactly big enough to hold all the samples you want to acquire."

In my application the acquisition is finite. but I not sure the about the location and formation of buffer . Is this buffer is generated in computer hard disk or on the NI-DAQ.
What I understand is as follows: It will generate a buffer of 70 Kbytes/channel I my case in the computer hard disk.

Thank you very much again

Zaidi

Message 3 of 4
(9,018 Views)

Hello Zaidi,

The buffer will be created in your computer’s RAM as opposed to the hard disk. Since the resolution of each sample is 14-bits, each sample will actually be transferred from the board into the computer memory as 2 bytes. Thus, you will actually have 80KB stored in the computer RAM. For your acquisition, at a specified rate of 20kHz, you would want to specify the samples per channel to be 40,000. With these settings, your acquisition will take 2 seconds and you will have 40,000 samples * 2 Bytes/sample = 80Kbytes per channel.  Hope this helps,

Daniel S.
National Instruments
0 Kudos
Message 4 of 4
(9,004 Views)