rasmusvt Posted August 4, 2014 Report Share Posted August 4, 2014 (edited) EDIT: This issue has been resolved using the solution mentioned in the question. Would be great if anyone could comment on whether or not this is a good way of solving this issue, or if there is a better way. I am writing a program that collects samples from two channels from a DAQ Board. In total it reads up to 5000 times per pixel, and records images up to 150x150 pixels. This means I get a problem with the buffer size, in that I get the error -200279 saying I have attempted reading data that is no longer available. I've been trying to find a way to flush the buffer after each pixel. Is there an easy way to do this? Would for example clearing the DAQ task and opening a new one for each pixel work? Edited August 4, 2014 by rasmusvt Quote Link to comment
crossrulz Posted August 4, 2014 Report Share Posted August 4, 2014 Do you have some code you can share so we can see how you have your task setup? In general, a buffer overflow is cause simply by not reading the data fast enough while in a continuous acquisition or by setting the buffer size (which will always be less than the default buffer size). Quote Link to comment
bjones Posted August 5, 2014 Report Share Posted August 5, 2014 It's hard to answer this with regards to your specific application without seeing some of the code-behind. If you'd post a snippet of how your tasks are configured and your DAQ read, that would be helpful! Quote Link to comment
Reds27 Posted August 5, 2014 Report Share Posted August 5, 2014 Like Crossrulz said, it's most likely that your buffer is just not big enough for the rate that your data is being acquired at. This KB outline the main techniques you could try to mitigate the error. Why Do I Get Error -200279 from my DAQmx Read VI or Property Node? http://digital.ni.com/public.nsf/allkb/AB7D4CA85967804586257380006F0E62 Normally, I like to use the AvailSampPerChan DAQmx Read property to see how much of my buffer is full, comparing it to the DAQmx Input Buffer VI (or property node). Most I the time, you can Read more frequently (decrease the "Number of Samples Per Channel" input of the DAQmx Read and that will prevent you from buffering up. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.