Speeding Up National Instruments Data Acquisition Retrigger
4 次查看(过去 30 天)
显示 更早的评论
I am using a NI USB-6212 DAQ for data collection. Data collection is triggered using an external source. The data trigger events occur every 10msec, but there seems to be ~100msec delay between trigger and actual data collection. I believe this is probably do to some overhead in resetting the trigger state. Does anyone know how this can be sped up? Code is below as well as an example output. The re-trigger signal occurs every 10msec.
% test NI-USB6212 data acquistion speed
close all
clearvars
clc
dev=daq.getDevices;
ID = dev.ID;
Duration = 10e-3;
SampleRate = 100e3;
s = daq.createSession('ni');
s.NumberOfScans = Duration*SampleRate;
s.Rate = SampleRate;
s.addAnalogInputChannel(ID, 'ai0', 'Voltage');
s.Channels(1).TerminalConfig = 'SingleEnded';
s.addTriggerConnection('External','Dev1/PFI0','StartTrigger')
s.ExternalTriggerTimeout = 30;
s.TriggersPerRun = 10;
[data, times] = s.startForeground();
plot(times,data,'.')
xlabel('time, sec')
ylabel('amp, V')
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!