Is it possible to use an NI USB-6002 using the Data Acquisition Toolbox only (error NI Error -200452)?
24 次查看(过去 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);
0 个评论
回答(4 个)
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.
0 个评论
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!