10-27-2009 10:43 AM
I have been running into a problem with the buffer being overwritten. The same software/code was running on an older Linux computer without a problem (CentOS <3). Have since installed Suse 11.0 and now receive the buffer error, -200279. I have attempted to increase our buffer size, but this does nothing.
Here is a code snippet:
// daqGetMonitors() // int daqGetMonitors(int size, double *monRaw) { static int32 read,rc; //rc=0; printf("rc=%d before DAQmxReadAnalogF64() in daqGetMonitors()\n", (int)rc); printf("daqGetMonitors(size=%d)\n", size); if (!daq_available) return(0); #ifdef USEDAQ // blocking wait until all samples are collected for the current frame rc = DAQmxReadAnalogF64(analogTask,size,10.0,DAQmx_Val_GroupByScanNumber,monRaw,4*size,&read,NULL); printf("ERROR: rc=%d after DAQmxReadAnalogF64() in daqGetMonitors()\n", (int)rc); //if (DAQmxFailed(rc)) return daqError(rc); #endif printf(" read=%d\n", read); return (size-read); }
Here is a summary of what i have tried to do and the outcome of each:
The error is being generated within daqGetMonitors() when it is called from the main program. Before I edited any code I got the buffer error code, rc = -200279 within the function daqGetMonitors() as soon as daqGetMonitors() is called. I get the buffer error before AND after the DAQmxReadAnalogF64() function is called. In other words, the error exists before daqGetMonitors has a chance to do anything. In the main program, rc = 0, both before [i]and[/i] after daqGetMonitors() is called indicating no buffer overflow errors.
In the main program, rc = 0, both before [i]and[/i] after daqGetMonitors() is called indicating no buffer overflow errors. I tried using rc as an (additional) input argument for daqGetMonitors which eliminates the buffer error before DAQmxReadAnalogF64() is called, but I still get a buffer error immediately after DAQmxReadAnalogF64() is called.
I cannot make sense of this. Can anyone suggest what is going on or additional steps to take to solve this? I have a feeling this is a simple coding error...
Thanks
10-28-2009 12:25 PM
Hi d-pabs,
What hardware are you using? What version of DAQmx are you using? What are you doing in your code? Are you doing a continuous acquisition? How fast are you sampling and how many samples per channel are you reading? The KnowledgeBase article, Why Do I Get Error -200279 from my DAQmx Read VI or Property Node?, will explain some troubleshooting steps for tracking dow the error 200279.
10-29-2009 10:33 AM
10-30-2009 09:55 AM
HI d-pads,
Is this the exact program from your old system? Your new system might run at a different rate so you may need to pull data from the buffer more quickly. In a continuous acquisition, I typically set the samples to read at about 1/10th of the sample rate for a typical application. You may need to adjust this up or down depending on your program.