05-13-2008 06:52 AM
05-15-2008 07:10 PM - edited 05-15-2008 07:20 PM
05-30-2008 06:04 AM - edited 05-30-2008 06:06 AM
Hello,
Status code -50103 “The specified resource is reserved” could be due to a couple of different cases. Please check if the Counter Output task (myTask3) is in finite mode. The class CNiDAQmxTiming item DAQmxSampleQuanityMode is where you can set the task to finite or continuous. When generating a finite pulse train, two counters are actually used and thus reserved. Since there are only two counters available on the cDAQ (9172), the error -50103 occurs when you are trying to reserve a total of three counters by adding in the Counter Input. If you change the CO pulse train to continuous mode, the task will only use one counter. Please refer to this KnowledgeBase for more detailed information.
KnowledgeBase 2VHDS879: Error -50103 With Multiple Counter Applications
The other possibility is that the posted code is being executed multiple times or looped and the tasks are not being cleared. Clearing the task will unreserved the task resources, so the next time the code is executed the resources will be free. Again, please refer to this other KnowledgeBase in Case 2 for more information.
KnowledgeBase 2WT74JMM: Causes of NI-DAQmx Error 50103 "The Specified Resource is Reserved"