LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxErrChk giving problem (The specified resource is reserved)

Solved!
Go to solution

Hi,

   I am new to programming. I have a four channel USB DAQ. I am using CVI to program the channels. One of the channels gives a simple output of a voltage signal while another generates a square wave. I have used the example programs for my code. I am using the example Volt Update for the first channel and the Cont Gen Volt Wfm-Int Clk example for the second case. When I run the program it compiles without error and runs. But when I start the generation of any type of wave for the second channel and try to change the voltage output for the first channel the program gives an error and breaks at

 

DAQmxErrChk (DAQmxStartTask(taskHandle));

 

from the volt update example.

 

The strange thing is that when I am not generating any output for the second channel it does not give any error when I change the voltage for the first channel.

Kindly please tell me what the problem is

 

The error which appears states that   

 

The specified resource is reserved. The operation could not be completed as specified.

Task Name: _unnamed Task<3>

Ststus Code: -50103

Regards,
Farhan Ahmad.
0 Kudos
Message 1 of 3
(3,097 Views)
Solution
Accepted by topic author lahorimunda

lahorimunda,

 

Thank you for posting on the NI Forums. If I understand correctly are you two different programs to run the different channels? If this is the case you are running across what is called a resource reserved error because you are only allowed to have one analog input task running at one time. You will need to put all of the channels within the same task, this will prevent you from running across the resource reserved error. Hope this helps. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 3
(3,082 Views)

Thanks for the help. But I figured out that I can use the DAQmxWriteAnalogF64 only once. I was using it twice in two seperate callback functions. Thanks for your help.

Regards,
Farhan Ahmad.
0 Kudos
Message 3 of 3
(3,065 Views)