Use NI USB 6001 without the Data Acquisition Toolbox
40 次查看(过去 30 天)
显示 更早的评论
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 个评论
Mario Malic
2023-8-31
https://uk.mathworks.com/matlabcentral/fileexchange/45086-data-acquisition-toolbox-support-package-for-national-instruments-ni-daqmx-devices and this https://uk.mathworks.com/matlabcentral/answers/489580-why-does-data-acquisition-toolbox-support-package-for-national-instruments-ni-daqmx-devices-fail-t say that you should be able to only install NI DAQmx for your MATLAB version and it should work.
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File 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!