09-26-2011 08:27 AM
Hello,
I've been working with labview for a couple of months and I was asked to add new data measurements to an old program. The problem is that whenever I add the new code for the new measurements I get error -200022. It says that it is located in the cDAQmx Start Task and the possible reason is that the channels for the new measurements have already been reserved by a different task. However, I have checked and made sure that the channels for the new code were not being used for the old program.
The old program is quite big and complex. I've been working on trying to understand every part of it, but its not easy and my supervisors asked me to complete this project in about two weeks. Is there a way that I can add my new code using without having to change anything from the old program?
Attached is an image of the error message that I'm getting.
Looking forward for any help,
Thanks.
Jose
09-26-2011 08:36 AM
Hello Jose,
I am David, an Applications Engineer at National Instruments UK
Without seeing the program that you are trying to run it is hard for me to make many comments on anything that could be causing the error. I have searched our resources here and have founf the following article that explains the reasons for getting this error message:
http://ae.natinst.com/public.nsf/web/searchinternal/5664c009da244727862571e900046775?OpenDocument
If you read this article it should guide you so that you can see the changes that are needed so that your program will run as desired. If this does not help then feel free to contact me again on this post and possibly attach the VI or a screenshot/ snippet of it so that I can have a go at debugging.
Good luck and let me know how it goes.
Regards
09-26-2011 08:40 AM
David,
The link you posted is not accessible to anyone outside of NI.
09-26-2011 08:45 AM
Apologies, below is the open web link:
http://digital.ni.com/public.nsf/allkb/5664C009DA244727862571E900046775?OpenDocument
Regards
09-27-2011 07:58 AM
I do understand that the problem is occurring with the cDAQmx due to having channels already being reserved. I've tried to locate the subVI that assigns the channels or creates the task for the old program, but there are quite a lot of subVI's for data entry I wanted to know if I can do this by creating a new subVI or using some functions? If not then I'll keep looking for the task create subVI or channel assessment subVI. By the way, by Traditional NI-DAQ do you mean the Data Acquisition functions and/or the Data Assistance functions?
Thanks,
Jose
09-27-2011 08:35 AM
Hello Jose,
I am sorry but know of no such SubVI's or functions. Have you tried 'Highlight Execution' so that you can see where the error is created which may help you to find the SubVI where the channels are being reserved? Also Traditional NI-DAQ was the predecessor to DAQmx and is still used by some of our customers.
Sorry I could not help further but let me know if you have any more questions?
Regards
09-27-2011 02:21 PM
Hello,
I did the Highlight Execution and noticed where the errors started to occur. I ran the new code in an independent vi, then I ran the old program and located errors. I've attached an image of the main program, and next I will attach another with the three subVI where the error occurs.
In order to add the new code, do I have to make any changes the functions and subVI's seen here?
Jose
09-27-2011 02:22 PM
Here are the remaining images of the subVI's
09-28-2011 03:28 AM
Hi Jose,
From the screenshots I can see you are receiving error- 200099. This error is caused by either the physical channel not being specified or it not being valid. I can see from the Block Diagram that the physical channel is specified but could be incorrect. I suggest you go and check that all of the channels are valid. I would do this by using the 'DAQmx Create Virtual Channel.vi' in a different VI specifying the same virtual channels that seem to be causing you errors currently.
Hopefully this should show a small error in the channels specified and your problem should be resolved. Let me know how it goes.
Regards
12-14-2011 07:45 PM
I read further more on this and it appears that it has to do with memory issue. It recommends to change the sample rate to avoid this. However, I haven't been able to find the right sample rate that would avoid this error from executing. I'm noticing that after a while the data from my VI starts to flow very slowly.
Also, when our system is off the VI still keeps displaying data as if it were being measured. I don't know if this is that the VI gets stuck in a loop or that by delaying the data acquisition, the VI still displays measurements taken earlier. Can anyone help me figure this out?
Thanks,
Jose