LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQmax Start Task Error -200022

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

0 Kudos
Message 1 of 20
(3,064 Views)

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

David B
Applications Engineer
National Instruments UK
0 Kudos
Message 2 of 20
(3,061 Views)

David,

 

The link you posted is not accessible to anyone outside of NI.

0 Kudos
Message 3 of 20
(3,058 Views)

Apologies, below is the open web link:

 

http://digital.ni.com/public.nsf/allkb/5664C009DA244727862571E900046775?OpenDocument

 

Regards

David B
Applications Engineer
National Instruments UK
0 Kudos
Message 4 of 20
(3,054 Views)

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

0 Kudos
Message 5 of 20
(3,042 Views)

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

David B
Applications Engineer
National Instruments UK
0 Kudos
Message 6 of 20
(3,038 Views)

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

0 Kudos
Message 7 of 20
(3,022 Views)

Here are the remaining images of the subVI's

0 Kudos
Message 8 of 20
(3,021 Views)

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

 

David B
Applications Engineer
National Instruments UK
0 Kudos
Message 9 of 20
(3,008 Views)

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

0 Kudos
Message 10 of 20
(2,951 Views)