| Data Acquisition Toolbox | Search  Help Desk |
| daqaction | Examples See Also |
Display event information for the specified event.
Syntax
daqaction(obj, event)
daqaction(obj, event, arg1, arg2, ..., argn)
Description
daqaction(obj, event) is an example action function that displays the type of the event, the time of the event and the number of samples acquired at the time the event takes place. Action functions must be passed two arguments. obj is a device object and event captures the event information contained by the EventLog property.
When any of the action properties are set to daqaction, the information described above is displayed to the MATLAB command window.
Example
This example callsdaqaction when a trigger event, runtime error event, or stop event occurs.
ai = analoginput('winsound');addchannel(ai, 1);set(ai, 'TriggerRepeat', 3);set(ai, 'TriggerAction', 'daqaction');set(ai, 'RuntimeErrorAction', 'daqaction');set(ai, 'StopAction', 'daqaction');start(ai);delete(ai);
See Also
PropertiesEventLog