12-09-2013 09:23 AM
hi,
my basic problem is having a 200279 buffer overflow.
for a quick fix I increased the buffer size using DAQmxSetBufInputBufSize, but now the signal coming from the simulated device is much slower.
how can it be?
thanx!
12-10-2013 10:37 AM
Hi,
When you say that the signal coming from the simulated device is much slower, how does it change (frequency, how often it updates, computer slows, etc.)? Also what did you change the buffer size to and what was it before?
Any information about what DAQ you are using and what type of data you are taking in might also help.
12-10-2013 10:53 AM - edited 12-10-2013 10:54 AM
hi evan,
i use a usb-6210 with a sample rate of 2000, so the default input buffer is 10000. when i change it to 100000, the looping simulated signal appears to be 10 times slower. it usually takes about 4 seconds to run one loop.
i use C++ with DAQmx 9.4.0 on a Windows XP machine.
12-11-2013 05:51 AM
Hi,
Buffer overflow errors occur when data is written to the buffer faster than it is being read off of it. Buffer underflow errors occur when data is being read off the buffer faster than new data is being added. In order to avoid either of these, a general rule of thumb for NI devices is to acquire around 1/10th of a second of data. For example, for a sample rate of 100 Hz, set samples to read at 10 samples.
Is it possible for you to decrease the sample rate?
12-11-2013 06:00 AM
thank you richard,
decreasing the sample rate slows down the signal even more.
i was already able to solve my buffer overflow problem. i am just curious why the signal slows down when increasing the buffer size. i hope to understand the ni devices better this way.
12-11-2013 06:00 AM
sorry to increase the sample rate
12-11-2013 08:49 AM
an increased sample rate speeds up the signal again, but it is not a solution because too much data is gathered. file become too big. 🙂