From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reserved Resource error with NI 9221 module

Hi,

 

I am using a NI 9221 module to read 3 analog signals in three different channels. I am reading continuously from Channel 3 in the main vi. I have a state machine diagram with case structure. In one of the cases, I am reading analog signal from channel 1 and 2 inside a subVI. I know that I can use same module for different tasks in the same VI. But as I am getting outside of main VI once I go inside the subVI, I get resource reserved error. How to solve this problem? I don't need to read signal from Channel 3 for the time period when I am reading from channel 1 and 2. Is there a way to hold reading from channel 3 only for that particular period and then resume again later. Please let me know. Thanks for your help.

 

Best,

Nil

0 Kudos
Message 1 of 2
(2,065 Views)

Hi Niloy, 

 

Please note it is very hard to troubleshoot code without actually being able to see it Smiley Wink

 

You are likely trying to create a new task before releasing the original one. If you request to use a resource (i.e. AI sample clock) but it is already being used in a different DAQmx task you will get this error. 

 

Is there a specific reason you can't configure the top-level task to have all three channels, and then read the channels as needed? 

 

Regards, 

Clint T.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,010 Views)