Clear Filters
Clear Filters

USB-6001 NI BOARD queueoutput issue

2 views (last 30 days)
Ali Momennezhad
Ali Momennezhad on 23 Apr 2024
Answered: Bhanu Prakash on 31 May 2024
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;

Answers (1)

Bhanu Prakash
Bhanu Prakash on 31 May 2024
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!

Categories

Find more on Instrument Control Toolbox Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!