01-24-2011 03:24 PM
Hi Sheldon,
Just a technicality in wording, but are you starting a task, stopping the task, and then clearing the task as well before creating a new task? Start and Stop Task.vi do control the task, but it still leaves the resources reserved until you call Clear Task.vi.
If you are looking to add an artificial amount of time into your program, you can use a state machine or sequence structure in your code to implement a timed wait while the progam completes one task and begins another, have you tried this out yet? This may help out the buffer issues without closing/exiting the program.
11-22-2011 08:19 PM
I am now using NI USB 6008 and I had the same error -200361 :Onboard device memory overflow. However, I noticed that the error occured only when I tried to config the timing, for example uing "DAQmx Timing.vi". If I just run the device without Timing, at max speed I guess, there is NO error, no matter how long I run or switch on/off many times.
This may solve the problem but I can't tell how fast the device's sample rate is because I don't know the exact value of dt. I know the maximum sample rate of the NI USB 6008 is 10kS/s, but when I measure a sine wave signal at a preset frequency and set dt = 0.0001 second (equivalent to 10kS/s), I got the frequency of the sine wave only half of the right value. To have the correct frequency value, I had to set dt = 0.00005, and that means the sampling rate is 20kS/s. That makes me really confused ! Did I make something wrong ? or the device is defect ?
11-22-2011 08:40 PM
Hi Kyle,
I do call Start, Stop and Clear task.
I have tried adding a wait function after calling Stop and Clear task but the buffer overflow error still happens randomly.
I will have to create a test program that only starts and stops/clears tasks and then post the code here to see if anyone can help.
Sheldon
11-27-2012 10:04 AM
I have fixed the problem by calling DAQmxClearTask only, now I am able to restart the task without a buffer overflow error.
12-21-2012 12:54 AM
It's a simple thing that for eg if a processor of a computer has low capacity the processing and switching between multiple acitivities is slow. But if it is has more capacity its faster. Same goes here also.
Natalia