Data acquisition: "dead" time with multiple immediate triggers

3 views (last 30 days)
My question pertains to the "dead" time mentioned on the last bullet point under "Tips" on the page:
Here is my code:
ai=analoginput('nidaq','Dev1');
ai.SampleRate=1000;
ai.SamplesPerTrigger=round(ai.SampleRate*20);
ai.TriggerType='Immediate';
ai.TriggerRepeat=3;
addchannel(ai,0:1);
start(ai)
wait(ai,90)
[data,time,abstime,events]=getdata(ai,(ai.SamplesPerTrigger*...(ai.TriggerRepeat+1)));
Here is a snippet of the "time" variable from the workspace.
19.9960000000000
19.9970000000000
19.9980000000000
19.9990000000000
NaN
20
20.0010000000000
20.0020000000000
20.0030000000000
The Nan obviously indicates the "dead" zone between the end of the first trigger and the start of the second one. However, there seems to be no "dead" time. The first sample of the second trigger has a time-stamp of 20.0 seconds. If there was "dead" time, the first sample should have been collected at 20.001 seconds.
Why does the "dead" time not show up? Is the issue of "dead" time dependent on acquisition rate? Is it that higher acquisition rates will be more likely to have "dead" time?

Answers (1)

Walter Roberson
Walter Roberson on 20 Aug 2013
Is the NaN deadtime? And not an occurrence of the tip above the one you refer to,
If multiple triggers are included in a single getdata call, a NaN is inserted into the returned data and time arrays and the absolute time returned is given by the first trigger.
  1 Comment
Anand
Anand on 20 Aug 2013
Indeed, the NaN is an example of the 'tip' you refer to. Hence I refer to it as an indication of the "dead" zone.
My question pertains to the tip given in the last bullet point. If that tip is to be believed, the first sample immediately following NaN should be acquired at 20.001 seconds. That is not the case.

Sign in to comment.

Categories

Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!