Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

I have a question on the execution duration of data acquisition

1 Ansicht (letzte 30 Tage)
xiaobo wu
xiaobo wu am 14 Apr. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
ai=analoginput('dataq',0);
addchannel(ai,0);
rates=1000;
samples=5000;
data_acq=1000;
set(ai,'SampleRate',rates);
set(ai,'SamplesPerTrigger',samples);
set(ai,'TriggerType','Immediate');
tic
start(ai)
toc
Q1. when I select 'samples' with 1000,2000,3000...
The elapsed time of start(ai) is always around 1.88 second. Could you explain this, please?
Q2. I add a sentence after start(ai):
tic
start(ai);
DataAcq=getdata(ai,data_acq);
toc
When I select 'data_acq' as 1000, 2000, 3000...
the corresponding elapsed time is 2.9s,3.9s,4.9s,....
it is about 1 second of interval. I understand here because the rate is 1000. But when I select 'rates' as 250, and 'data_acq' as 250,500, 750,...
the corresponding elapsed time is 2.2s,2.4s,2.7s.
the interval is only 0.2/0.3s. here the rate is 250, it should be 2.2s,3.2s,4.2s...
I feel confused.
Do I set the parameters wrong?

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by