Is it possible to use an NI USB-6002 using the Data Acquisition Toolbox only (error NI Error -200452)?

28 views (last 30 days)
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.
Property: DAQmx_AI_Coupling
Channel Name: Dev1/ai0
Task Name: _unnamedTask<95>
Status Code: -200452
My code:
% Read and Write to NI USB-6002
clc
clear
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
% addAnalogInputChannel(NI_daq_session,'Dev1','ai0','Voltage');
% NI_daq_session.addAnalogInputChannel('Dev1','ai1','Voltage')
% ch=addAnalogInputChannel(NI_daq_session,'Dev1','ai0', 'Voltage');
[ch, idx] = addAnalogInputChannel(NI_daq_session,'Dev1','ai0','Voltage');
% startForeground
data = inputSingleScan(NI_daq_session);

Answers (4)

Friedrich
Friedrich on 1 Oct 2014
Hi,
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.

Othmane
Othmane on 7 Oct 2014
I am having the same problem

Othmane
Othmane on 7 Oct 2014
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
muhammet balcilar on 13 Nov 2015

Categories

Find more on Simultaneous and Synchronized Operations 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!