How to get recent n-samples using Data acquisition toolbox?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で National Instruments Frame Grabbers についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!