Hey AM,
The error you are having is a buffer overwrite error. A couple things we need to know before we can decide how to best adjust your application are:
1 How many channels are you reading data in on?
2 Are you peforming finite or continuous acquistion? If it is continous how many samples are you reading at a time with the DAQmx Read VI?
3 When you say 2 or 5 seconds is that roughly how long your program is working before the error, or do you have a timer control?
4. What version of LabVIEW are you running and what version of DAQmx? (You can check both of these in MAX under the software tree)
The attached VI has a display for the available samples per channel in the buffer. If you can add the property node that displays that value to your current acquisition we could see if your buffer continously rises. Depending on how much processing you are doing in your while loop you will run into the buffer not being emptied fast enough, but we will be able to find a way to get your application running. Please get back to me with those answers and have a great day.
Michael