Data Acquisition Toolbox | ![]() ![]() |
How Many Triggers Occurred?
For analog output objects, only one trigger can occur. You can determine if the trigger event occurred by returning the value of the TriggersExecuted
property. If TriggersExecuted
is 0
, then the trigger event did not occur. If TriggersExecuted
is 1
, then the trigger event occurred. Event information 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 output object ao
for a sound card and add one channel to it. ao
is configured to output 8,000 samples using the default sampling rate of 8000 Hz.
ao = analogoutput('winsound'); addchannel(ao,1); data = sin(linspace(0,1,8000))'; putdata(ao,data) start(ao)
TriggersExecuted
returns the number of triggers executed.
You can use showdaqevents
to return information for all events that occurred while ao
was executing.
For more information about recording and retrieving event information, refer to Recording and Retrieving Event Information.
![]() | Executing the Trigger | When Did the Trigger Occur? | ![]() |