필터 지우기
필터 지우기

Use NI USB 6001 without the Data Acquisition Toolbox

조회 수: 29 (최근 30일)
Paul
Paul 2023년 8월 31일
답변: chrisw23 2023년 10월 26일
I have a measurement system running on Matlab 2014a on an old laboratory computer. I purchased an NI USB 6001 to produce an analog output using that lab computer. The issue is that due to security reasons, the company prohibits to connect that lab PC to the internet, which makes it difficult to install the data acquisition toolbox needed to interface matlab with the NI USB 6001.
Is it possible to communicate with the NI USB 6001 card with matlab, but without the data acquisition toolbox?

답변 (1개)

chrisw23
chrisw23 2023년 10월 26일
It is, using the .net DAQmx driver...some code lines ...
NET.addAssembly('NationalInstruments.Common');
NET.addAssembly('NationalInstruments.DAQmx');
import NationalInstruments.DAQmx.*;
obj.DaqSystem = NationalInstruments.DAQmx.DaqSystem(); % init DAQ System
...
function device = loadDevice(obj,deviceName)
% try to load requested device by alias
devIndex = obj.Devices.DeviceID == deviceName;
if any(devIndex)
obj.CurrentDevice = obj.DaqSystem.Local.LoadDevice(obj.Devices.DeviceID(devIndex));
else
assert(false,"Error@DAQmxBase load device failed " + newline + "devices found are " + obj.Devices.DeviceID.join)
end
device = obj.CurrentDevice;
end

카테고리

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

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by