Is it possible to use an NI USB-6002 using the Data Acquisition Toolbox only (error NI Error -200452)?
21 views (last 30 days)
Show older comments
Roger on 30 Sep 2014
Edited: Walter Roberson on 14 Nov 2015
I am using R2014a and its Data Acquisition Toolbox. I am able to establish a session, communicate to setup DI/O, Analog Output and Timer, but can not create an Analog Input. The error I get from this is as follows:
Error using Read_Write_NI_daq (line 23)
NI Error -200452:
Specified property is not supported by the device or is not applicable to the task.
Channel Name: Dev1/ai0
Task Name: _unnamedTask<95>
Status Code: -200452
% Read and Write to NI USB-6002
NI_daq = daq.getDevices;
NI_daq_session = daq.createSession('ni'); % create session with the daq
% add analog output channel
% [ch, idx] = addAnalogOutputChannel(NI_daq_session,'Dev1',0:1,'Voltage');
% outputSingleScan(NI_daq_session,[-2.5 3.5]);
% add digital channels
% [ch, idx] = addDigitalChannel(NI_daq_session,'Dev1','port0/line4:7','OutputOnly');
% outputSingleScan(NI_daq_session,[1 0 1 0]);
% add analog input channel
% ch=addAnalogInputChannel(NI_daq_session,'Dev1','ai0', 'Voltage');
[ch, idx] = addAnalogInputChannel(NI_daq_session,'Dev1','ai0','Voltage');
data = inputSingleScan(NI_daq_session);
Friedrich on 1 Oct 2014
The USB 6002 is not officially supported by Data Acquisition Toolbox. For a list of supported devices see here. Maybe try to upgrade to a nidaqmx version greater than 9.8.x and try again. There were some driver changes on the NI side which might make it possible to use.
The AOs work just fine for this 6002 Device using the exact same syntax, but the AIs don't work and I get the same error message as above. I am also using the latest version of the nidaqmx
muhammet balcilar on 13 Nov 2015
here is the the solution
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!