11-26-2010 02:08 AM
11-29-2010 05:17 AM
Hello Buddy,
I think, you can resolve this problem by connecting "-1" to the timeout of DAQmx Read function and reducing the" no. of samples per channels" in the same fuction.
Even if it is not resolved, then send me your code to help you more in this matter.
02-15-2011 02:19 PM
The DAQmx driver uses a buffer of finite size to store samples acquired by a device. This buffer is filled up as samples are received from the device, and emptied when the samples are read by a user. If samples from the device fill up the buffer, because the user isn't reading fast enough, you will get error -200279. Now, to answer your questions --
Is there any way I can recover from this error ? I want to continue with the acquisition even after this error happens, it is possible ?
You can completely avoid this error by setting DAQmx Read property node > Overwrite Mode to the 'Overwrite Unread Samples'. This will prevent an error from being returned when the DAQmx buffer fills up and samples get overwritten, which means you will have no indication when samples are overwritten. This is not entirely desirable, as you will have discontinuities in the data read.
On the other hand, if you leave the error enabled and eventually get the error, you can check if the error code returned is -200279 and then delete the error through the DAQmx Clear Error VI or something such. This will let you continue, albeit by masking the error.
Is there any way to increase the priority of thread which does the acquisition ?
I doubt that increasing the priority of the thread will solve the problem in a reliable way. Besides increasing the size of the buffer, you could look into optimizing the read loop to execute faster. An example of using a producer-consumer pattern to make a lightweight read loop is available here -- http://decibel.ni.com/content/docs/DOC-2431
Hope this helps.
11-13-2014 08:49 AM
Hi,
Years later, it seems that the answer hasn't be found.
You have to reset the date sample, otherwise, it will generate always the same error.
Here is my code (in French, quickly made) to reset the task :
Best Regards