Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR 50202!

I'm using a USB 6009 to control 3 relays, among other things.  I need to run my program for about 6-7 days and after about 2 days I get an Error 50202 at DAQmx Start Task.  I've the few posts that already exist on the topic and they do not help.  I don't think it's my code, but it's clearly a possibility, although the error is occurring in the DAQ portion of the code, which I didn't write...  The computer it's running on is not a multi core or multi proccessor machine.... I'm currently running an example that uses the start task vi to see if I get the same error.  Thoughts, comments, help, please!!!!


Thank you.
0 Kudos
Message 1 of 3
(3,822 Views)

Hi JMIS.

Welcome to the discussion forums. 

I realize that you are using someone else’s code, however can you confirm that you are following the proper DAQ programming style.  Create, configure, start, acquire, and clear.  Browse the examples and ensure that you are following something similar in the acquisition portion of your code. 

From the sounds of where the error is occurring (at the Start Task VI) it sounds like there are multiple DAQ tasks being created.  Ensure that each is cleared, not just stopped every iteration.  If you are creating and clearing tasks, then maybe redesigning the method you are acquiring the data might solve the error.  For instance, you could create a single task and design it to run the length of the acquisition rather than starting and stopping a simpler task. 

Let me know how your Start Task VI test is going.  Are you running into the same error after prolonged use?

Have a great day

Chris_K

0 Kudos
Message 2 of 3
(3,797 Views)
I figured it out, but it may not have had a whole lot to do with the DAQ tasks.  I was starting, stopping, and clearing the tasks all the time, but the only problem was that they were running continuously.  I changed it by adding a case structure.  The other possible cause for the error was the file I was writing to.  I realized that it was gigantic, so I changed it to allow the write to file only at specific intervals.  Once I made these changes, my program ran perfectly without the error.  I appreciate your help.
0 Kudos
Message 3 of 3
(3,722 Views)