LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No change to code from yesterday to today, today I am getting Error -50103

I am having trouble understanding the cause of this problem.  I am working in an application that was created by others and handed off to me.  I am new to LabVIEW, and learning on the fly.   Today when I started the application, I received Error -50103:  The specified resource is reserved.  I have not made any changes to the code in the past several days, and the program was running correctly yesterday.  I have attached the sections of code that are creating the errors.  I want to find a way to fix the errors that are occurring at the DAQmx Start Task VI's.

 

I am using two counters, each receiving input from a retro-reflective sensor.  I suspect that one or both of the counter tasks are using two counters, but if that is the case then the program never should have worked.

 

Any input or help is appreciated.

0 Kudos
Message 1 of 7
(2,615 Views)

Have you already taken a look at this article that discusses multiple methods for resolving that particular error code?

 

http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89

 

 

0 Kudos
Message 2 of 7
(2,595 Views)

If I had to guess from your description, I'd guess case 7 is the issue.  Sounds like maybe you aborted the code instead of stopping normally and didn't free the resources.  The "Stop Sign" looking button is an abort and it's use should be avoided if possible.  If you pressed that while the code was running, this error could mean your resource is reserved.  See the article for more details

0 Kudos
Message 3 of 7
(2,591 Views)

Shane,

 

I read through that article before posting here, and my best guess was case 3, since both sections of code use counter tasks.  I looked into case 7 as you suggested, and I do not believe that is the issue.  The error is occurring on the first pass through the code, before there is a chance for an issue to be caused by resources not being released.  Both sections of code have a Clear Task VI at the end, and one has a Stop Task VI.  I tried adding a Stop Task VI to the other section and running the code, and there was no difference; error 50103 occurred as soon as the code reached the Start Task VI's in both sections.

0 Kudos
Message 4 of 7
(2,574 Views)

If I am not mistaken, the only count tasks that require two counters are the "High Frequency" or "Large Range" frequency read tasks. Have you completely shutdown the LabVIEW application recently? If you have not released resources in a prior execution this should do the trick. Or, do you have a task running in NI MAX? 


Corey Rotunno

0 Kudos
Message 5 of 7
(2,562 Views)

Corey Rotunno,

 

The CI Period "Large Range" task is listed as requiring two counters.  Does LabVIEW determine what a large range is automatically, or is that user-defined?  The range of values expected for this CI period task go from 0.1 seconds to 2000 seconds, so maybe LabVIEW has determined this to be a large range?  

 

I have shut down LabVIEW completely and tried to run this program after restarting, it yielded the same result that I described above.

0 Kudos
Message 6 of 7
(2,525 Views)

Through trial and error, I found out that changing ctr0 to ctr2 and ctr1 to ctr3 for the counter inputs solved the errors that I had been running into.  Now the program is running as intended again.  I do not understand why this helped, nor do I have an idea of what caused the errors in the first place.  If anyone has an idea of what caused the problem or why that solution worked, I am still very curious to hear your thoughts.

0 Kudos
Message 7 of 7
(2,505 Views)