Info
This question is closed. Reopen it to edit or answer.
I have a question on the execution duration of data acquisition
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!