Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cDAQ-9172,NI 9205 module, Matlab

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.

0 Kudos
Message 1 of 7
(3,774 Views)

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.

Best regards,
Rohan B
0 Kudos
Message 2 of 7
(3,756 Views)

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

0 Kudos
Message 3 of 7
(3,750 Views)

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.

Best regards,
Rohan B
0 Kudos
Message 4 of 7
(3,739 Views)

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

0 Kudos
Message 5 of 7
(3,730 Views)

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.

Best regards,
Rohan B
0 Kudos
Message 6 of 7
(3,715 Views)

Hi Rohan,

 

Thank you for your help.

 

Best Regards,

 

Sherif

0 Kudos
Message 7 of 7
(3,696 Views)