Filter löschen
Filter löschen

USB-6001 NI BOARD queueoutput issue

2 Ansichten (letzte 30 Tage)
Ali Momennezhad
Ali Momennezhad am 23 Apr. 2024
Beantwortet: Bhanu Prakash am 31 Mai 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;

Antworten (1)

Bhanu Prakash
Bhanu Prakash am 31 Mai 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!

Kategorien

Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by