How to get recent n-samples using Data acquisition toolbox?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I'm new to Session-Based Interface with Data Acquisition Toolbox. I'd like to make a real-time feedback system (I used NI DAQ device(USB-6002).). Using Legacy interface, we can use the command below to get recent n-samples.
data = peekdata(obj,samples)
In Session-Based Interface, I wrote a code below, but got an error like this
"On this platform, notifications more frequent than 20 times per second may not be achievable".
I'd like to get recent samples more frequently.
function func1
daqInfo = daq.getDevices;
daqVendor = daq.getVendors;
s=daq.createSession(daqVendor.ID);
addAnalogInputChannel(s,daqInfo.ID,'ai0','Voltage');
s.Rate = 16000;
s.IsContinuous = true;
lh = s.addlistener('DataAvailable',@func2);
s.NotifyWhenDataAvailableExceeds = 160;
end
function func2(src,event)
dat = data.event;
end
Is there any way to get recent n-samples more than 100 times/second(e.g. >100Hz)?
Thanks in advance.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre National Instruments Frame Grabbers en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!