10-31-2010 04:39 AM
I keep getting the joyous Error 50103 after the start task, I cannot get the product to run at all now. I have reset the device and followed all the steps on the nI recommendation page. None of them unfortunately seem to solve the problem and MAX wont let me get data either, stating the same error.
Any ideas how to resolve?
10-31-2010 03:12 PM
You have some process or program somewhere that has the DAQ device already in use. Normally, it is multiple DAQ tasks in one program using the same card. It could be one DAQ task while yoiu have MAX open at the same time. Could be something else.
Close down everything and reopen and try again. If that doesn't work. Close everything, shut down and reboot.
11-01-2010 04:46 AM
From the code you posted I can see you have made a copy of the 'Dev1,a0:1' constant and have not wired it to anything, it could be a an idea to delete this.
Let us know if any of the steps you've taken have worked!
11-01-2010 08:59 AM
I have found a Knowledge Base article which relates to the problem you are seeing which you may or may not have already seen. I have linked this below for your convenience.
Having had a look at your code I would suggest that Case 2 seems like a potential cause of the problem since you are continually creating and starting your task in a loop. You should only need to create, configure and start your task once, then call the read function in the loop as needed. For an example on how to best architect your DAQ application refer to the Cont Acq&Graph - Int Clk.vi example that is referred to in the linked KB. To find the example, launch LabVIEW and go to Help»Find Examples. Browse by task to Hardware Input and Output»DAQmx»Analog Measurements»Voltage.
I hope this helps.
11-02-2010 05:42 PM
Thank you for the messages. I have seen the articles and case two is indeed the reason why I got the error in the first place. What I am after was a solution to undo this error on the fly. Ie, when it turns up and creates that error that I can go into the error handling fg and put in some code to free up the resource and start the task again. If anyone knows if this is possible that would be ideal. This is on a long term logger so needs to be clever enough to solve its own problems without human intervention.
The DAQ constants are things I wired in while trying to solve the problem and see if the other tasks are there, wouldn't of thought that they would effect it but have removed them anyway. Any thoughts would be appreciated?
Restarting the PC did solve the problem, but as mentioned need a better solution ideally
11-03-2010 04:14 AM
One way of ignoring a specific error is to use the General Error Handler VI. By wiring -50103 up to the [error code] input of the VI, the General Error Handler VI will ignore error -50103 but will handle all other errors as usual.
I don't think that this is going to help you in this case however. The only way to overcome the problems you are having at present is to eliminate the reserved resource issue through the use of good DAQ programming practices i.e. not continuously configuring and starting your task in a loop. There are a number of examples in the NI Example Finder which highlight such good programming practices such as the one cited in my last post.
I hope this helps.