Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200022 using NI-9401 to read inputs and monitor counter using one task

I get a "Resource requested by this task has already been reserved by a different task." when trying to setup to read some input ports while also monitoring a counter on the module. How is the best way to configure this setup so I can do both things using just one task without getting this resource task error? You should be able to do this somehow one would think. Can someone kindly provide a sample of setting this up?

 

Thanks.

0 Kudos
Message 1 of 4
(2,807 Views)

Hi QRP, my name is Basil from National Instruments Applications Engineering. Make sure that you are not using the same counters or channels when attempting these two tasks. Also if you show us your code we might be able to better assist you.

0 Kudos
Message 2 of 4
(2,773 Views)

Hi Basil, thanks so much for your reply. I have the 9401 in the 9188 Chassis. I just can't figure out how to get rid of the reserve task error when the second task is started. All I'm trying to do is monitor some inputs on the 9401 while a counter is running on the same module to count motor steps. Attached is the VI I'm using to do this and I don't have anything other VI running any tasks using this module, but this VI. Could you look over the VI and let me know what the problem is and how I could resolve this error. I would greatly appreicate that.

 

Thank you.

 

 

0 Kudos
Message 3 of 4
(2,767 Views)

Hi QRP,

 

In your Digital Input task, you can set the DAQmx Channel:: DI.Tristate property to FALSE to make your application work.

 

Thanks,

Ryan Campbell
NI R&D
0 Kudos
Message 4 of 4
(2,752 Views)