Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Over sampling, Buffer Size Exceeded

Why do I get this message when running an AI reading in the signal from a tach:

Attempted to read samples that are no longer avilable. The requested sample was previously available, but has since been overwritten. Increasing the buffer size, rerading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct this problem.

Help!!! Thanks
0 Kudos
Message 1 of 6
(4,499 Views)
Hello,

Thank you for contacting National Instruments.

This error indicates that you are acquiring data faster than you are reading it out of the buffer. When you start a buffered acquisition, the data starts filling up a PC buffer. As the acquisition continues, you will need to read the data out of that buffer before it is overwritten by newly acquired data.

Possible fixes are decreasing your sample rate so that you are not filling the buffer as fast, increasing your buffer size (this will only make increase the time it takes for the error to occur), reading the data from the buffer more frequently (with DAQmx Read.vi), or reading larger blocks of data per read.

Let me know if you have any further questions.

Sean C.
Applications Enigineer
National Instruments
Message 2 of 6
(4,485 Views)
Ok, I would decrease the sampling rate.

I have another problem though. When I read an AI channel and display on a waveform graph, after a couple seconds, the sinusoid goes flat or disappears. Why is that? It works the first time when I test using DAQ Assistant but would not work again after that.

Why do I see a constant signal when I am supposed to be seeing a sinusoid? Thanks
0 Kudos
Message 3 of 6
(4,479 Views)
How are you reading this analog signal? Are you doing a finite or continuous acquisition? Can you verify that the signal itself doesn't go flat? Try measuring the signal with an oscilloscope as you are performing your acquisition.

-Sean C.
0 Kudos
Message 4 of 6
(4,469 Views)
I have an oscilloscope that I am using at the same time to look at the signal. The signal on the scope doesn't go flat but the one on DAQ app goes flat. I am doing a continous acquisition.

-------
0 Kudos
Message 5 of 6
(4,460 Views)
Can you view the signal correctly from a Test Panel in Measurement and Automation Explorer? How about using a shipping example? What program are you using to write your code, LabVIEW? VB? C++?

If you can correctly view your signal with a Test Panel or with an Example Program, then the problem is most likely in your code. If not, then you probably have a damaged DAQ device.

Let me know your results.

Sean C.
0 Kudos
Message 6 of 6
(4,454 Views)