Data Acquisition Toolbox | ![]() ![]() |
How Many Triggers Occurred?
You can find out how many triggers occurred with the TriggersExecuted
property value. The trigger number for each trigger executed is also recorded by the EventLog
property. A convenient way to access event log information is with the showdaqevents
function.
For example, suppose you create the analog input object ai
for a sound card and add one channel to it. ai
is configured to acquire 40,000 samples with five triggers using the default sampling rate of 8000 Hz.
TriggersExecuted
returns the number of triggers executed.
showdaqevents
returns information for all the events that occurred while ai
was executing.
showdaqevents(ai) 1 Start ( 10:22:04, 0 ) 2 Trigger#1 ( 10:22:04, 0 ) Channel: N/A 3 Trigger#2 ( 10:22:05, 8000 ) Channel: N/A 4 Trigger#3 ( 10:22:06, 16000 ) Channel: N/A 5 Trigger#4 ( 10:22:07, 24000 ) Channel: N/A 6 Trigger#5 ( 10:22:08, 32000 ) Channel: N/A 7 Stop ( 10:22:09, 40000 )
For more information about recording and retrieving events, refer to Recording and Retrieving Event Information.
![]() | Repeating Triggers | When Did the Trigger Occur? | ![]() |