09-24-2009 10:14 AM
m610,
What is the full text of the error code you are getting back? The error description should give the name of the task that is returning the error, this may aid debugging on our end. If you have not explicitly assigned a name to your tasks, I would suggest doing so to make this problem easier to track down.
Also, the error you are receiving is because one of your tasks has one or more hardware resources reserved and another task is trying to access that same resource. For example, you can't have 2 tasks trying to access the AI subsystem at the same time because their is only one physical ADC on the board. The IsTaskDone function will only tell you if your finite acquisition is complete and will not help if you are performing a continuous or on demand acquisition. In your case, you may want to explicitly call a DAQmx unreserve operation on your task after you have read all your data. This will release the hardware resources for your other tasks to use.
I concur with the above comments - this very well could be a slight disruption in timing in your multi-threaded application caused by a virus scanner or disk defragmentation happening in the middle of the night that you may not see during the day. Calling unreserve and reserve explicitly should solve your problem.
Let me know if that helps.
11-09-2009 10:34 PM
Just a quick follow-up on this.
We're 99% sure the problem was due to various power-savie features on their computer kicking in. The network card did this on its own, and the motherboard did it, too. I had editied the program to include time and date in the error messages and using that info and comparing it to the computer's event log we found networks and other services shutting down at about the same time. About being seconds after.
Thanks for the help.