I have a 9181 chassis with a single 9375 module installed. When things go wrong and my code ends up trying to run a task that has been closed or not opened yet, I get this -201003 error. The message says something about "device not available". The problem is that I can't find a way to reset the DAQmx system so that I can recover from this error. Yes, I need to be meticulous about not trying to run an invalid task but shouldn't I be able to reset the device and recover programatically? Unfortunatly, even if I perform a device reboot via MAX I still can't recover. The only way to recover is to manually pull the plug on the chassis. Is this the way it should work or am I missing something?
More information. This code is running in a VI called by TestStand. Turns out that I don't need to power cycle the device, but do need to restart TestStand (and LabVIEW). If I open MAX I can reserve the chassis, open and run the tasks I have set up but until I restart TestStand, I can't get past the error.
What I have found is that my problem occurs when I try to run a task without the task started. I have restructured my code now so that it should be impossible to run a task if it is not "active" and have had no issues since. My question though is about recovering from this situation. Why should this be unrecoverable? Isn't there a way to reset DAQmx programatically without shutting down TestStand and LabVIEW?
There is a DAQmx Reset Device.vi that you can use to reset a device back to its configuration state. Have you tried this?