Borrar filtros
Borrar filtros

USB-6001 NI BOARD queueoutput issue

2 visualizaciones (últimos 30 días)
Ali Momennezhad
Ali Momennezhad el 23 de Abr. de 2024
Respondida: Bhanu Prakash el 31 de Mayo de 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;

Respuestas (1)

Bhanu Prakash
Bhanu Prakash el 31 de Mayo de 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!

Categorías

Más información sobre Instrument Control Toolbox Supported Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by