LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Start Task Error -201105

Hi,

 

I have a long-runnning system that makes repeated measurements. Occasionally, DAQmx Start Task throws error -201105.The system ran fine for several weeks before this error started showing up. I'd like to know why and how I can avoid it or work around it.

 

The error message that belongs to this code reads:

Resource requested by this task has already been reserved by a different task with conflicting settings. Unreserve any other tasks using this device, or change their settings to be compatible with this task.

 

Can I find out which requested ressource is reserved? There should not be any other task..

 

Some more details: The system consists of three cDAQ 9189 and a cRIO 9047 which controls the others. The cDAQs are equipped with NI 9230, the cRIO with NI 9230 and a NI 9219. There is a separate task for each device but the tasks are set to start at the same (host) time. The cRIO runs an additional continuous task for acquisition from the NI 9219. The repeating measurement looks basically like this:

wait for start time (minus sync time) -> set start time for each task -> start each task -> acquire data -> stop each task -> repeat

 

The error occurs while starting the tasks. When that happens I will: clear tasks, reset cDAQs, unreserve cDAQs, reboot cDAQs and reboot cRIO. After rebooting, the cDAQs will be reserved and the tasks configured as before. Everything works fine again for some intervals.

 

All this runs in its own network so there is no other device that could interfere.

 

Any ideas?

0 Kudos
Message 1 of 3
(2,030 Views)

I was in on a related-sounding thread a couple years ago.  In that one, I believe tasks were *cleared* and then recreated rather than merely stopped and restarted.

 

My theory was / is that Clear Task causes DAQmx to *begin* the process of freeing up task-related resources it took ownership of, but some of those things may not be fully complete when the function call returns.   When I encountered something similar, I think I hacked up something like a 1/4 second extra delay between clearing and recreating, which seemed to work more reliably.

 

There's a lot less to do in a call to Stop Task than a call to Clear Task, but perhaps something a little similar is going on?  If you search for "DAQmx Task State Model", you'll find some info to suggest you might want to "commit" each of these tasks before the first Start.  Then each subsequent Stop / Start cycle will be able to execute more quickly, specifically because there's less to do during the Stop.

 

On the other hand, there have been many many threads here involving people stopping and restarting tasks in a loop, and the error you mention doesn't ring a bell for mere stops and restarts.  Only for clears and recreates.  So maybe there's a whole other explanation for your particular case.  (Any chance there's parallel code where the Start can *potentially* get called before the Stop?)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 3
(2,024 Views)

Without seeing your code it's hard to tell. My guess is that the problem is not with starting the task, but with stopping it. The task is for some reason not getting stopped on the previous iteration of the loop.

 

Is there a reason that you're starting and stopping the task every time? 

0 Kudos
Message 3 of 3
(2,008 Views)