08-01-2010 11:41 PM
I am using NI cDAQ-9172 with two NI 9205 modules (for analoginput) and one NI 9263 module (for analogoutput). It is ok to start one analogoutput (AO) and one analoginput simultaneously (AI); start([AI AO]) but when I try to start two analoginputs AI1 and AI2 using two modules; start ([AI1 AI2]), I get the following error:
??? NIDAQmx error : Resource requested by this task has already been reserved by a different task. Task Name: MWDAT0016 Status
Code: -200022
Error in ==> daqdevice.start at 62
start( daqgetfield(obj,'uddobject') );
Error in ==> DAQ_17>run_daq_pushbutton_Callback
at 799
start([AI1 AI2])
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> DAQ_17 at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)DAQ_17('run_daq_pushbutton_Callback',hObject,eventdata,guidata(hObject))
If anyone can help me to solve this problem, it will be greatly appreciated.
Thanks in advance.
08-02-2010 02:16 PM
Hi Sherifnoor,
I wanted to let you know that the error 200022 you are receiving is usually due to a resource reservation. That means that you have not ended a task using one of the Analog Inputs before starting a task that uses the same channels of the Analog Input module. I would suggest ending the task before starting a new one.
08-02-2010 05:15 PM
Hi Rohan,
Thank you for your prompt reply.
You are right but I need to run two analog modules or more simultaneously. I fact I need to acquire data from 8 modules together (256 channels). I found the following information on the cDAQ 9172 manual but I do not know how to overcome this problem:
"The NI cDAQ-9172 has one AI timing engine, which means that only one analog input task can be running at a time on a chassis. However, the analog input task can include channels from multiple analog input modules."
Please if you have any suggestions, let me know.
Best Regards,
Sherif
08-03-2010 09:36 AM
Hi Sherif,
If you want to do analog input on multiple devices, you will have to configure the task such that multiple analog input channels are included in the task. Basically all of your analog input channels will need to be included in the same task and operate at the same sampling rate. Please let me know if you have any questions.
08-03-2010 10:19 PM
Hi Rohan,
Thank you very much, I really appreciate your help.
I have tried hard to do your suggestion in Matlab but I could not find any useful information on how I can create one task with multiple analog input channels (or even how to create a task in general). I do not mind if all channels operate at the same sampling rate. If you have any idea on how to create tasks in Matlab, please let me know.
Best regards,
Sherif
08-04-2010 02:20 PM
Hi Sherif,
NI-DAQmx is not officially supported in that software. However, DAQmx is officially supported in LabVIEW, SignalExpress, and CVI. Using these software platforms, you can certainly create tasks using multiple channels.
08-06-2010 12:18 AM
Hi Rohan,
Thank you for your help.
Best Regards,
Sherif