USB-6001 NI BOARD queueoutput issue

10 次查看(过去 30 天)
Hello there,
I have a USB-6001 NI board. As far as I am concerned the onboard buffer size of this device is low.
I have two signals which have 100.000 samples when I use QueueOutputData for this data it never finishes the operation. It seems the solution is to chunk the data but I have no idea how. I dont receive data from input Analog channels.
Here is my code:
s=daq.createSession('ni');
Unable to resolve the name 'daq.createSession'.
addAnalogOutputChannel(s,'Dev1',0:1,'Voltage');
tc = s.addTriggerConnection('External','Dev1/PFI0', 'StartTrigger');
tc.TriggerCondition='RisingEdge';
s.Connections
s.Rate=5000;
data1=[linspace(-1,1,100000); linspace(-1,1,100000)];
queueOutputData(s,data1.');
s.prepare();
s.startBackground();
s.ScansQueued
s.IsRunning
s.IsLogging %no trigger no logging
s.wait();
s.IsDone
delete(s);
clear s;

回答(1 个)

Bhanu Prakash
Bhanu Prakash 2024-5-31
Hi Ali,
I once encountered a similar error, and installing the 'Data Acquisition Toolbox' did the trick for me.
You can install the toolbox by using the Add-on Explorer in MATLAB. For guidance on using the 'Add-on Explorer', refer to the following documentation:
I hope this is useful!

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by