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

조회 수: 13 (최근 30일)
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);

답변 (4개)

Friedrich
Friedrich 2014년 10월 1일
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 2014년 10월 7일
I am having the same problem

Othmane
Othmane 2014년 10월 7일
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 2015년 11월 13일

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by