09-03-2013 10:36 AM
I'm calling the attached VI at least 10x in the main VI and works fine but sometimes it's giving me an error-200279. Can someone please tell me why?
Thank you in advance.
Solved! Go to Solution.
09-03-2013 10:44 AM
Your buffer isn't big enough.
You are collecting 20,000 samples per second, but only set it for 2000 samples per channel. So that is 1/10 second worth of data. You are reading 1000 samples at a time, so about 1/20th second. If the loop is running fast enough, you can keep up and won't get an error.
If there is a small delay (perhaps Windows goes off and does something else for 50 or 100 msec.) your buffer will overflow.
I'd suggest eliminating the 2000 constant where you set the samples/channel and try again. See if it behaves better.
09-03-2013 02:31 PM
Thanks RavensFan! It works better now..