Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I have a question on the execution duration of data acquisition

조회 수: 1 (최근 30일)
xiaobo wu
xiaobo wu 2014년 4월 14일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by