Data Acquisition Toolbox | ![]() ![]() |
Event Types
The analog output event types and associated action properties are described below.
Event Type |
Property Name |
Run-time error |
RuntimeErrorAction |
Samples output | SamplesOutputAction |
SamplesOutputActionCount |
|
Start |
StartAction |
Stop |
StopAction |
Timer | TimerAction |
TimerPeriod |
|
Trigger |
TriggerAction |
Run-time Error Event. A run-time error event is generated immediately after a run-time error occurs. This event executes the action function specified for RuntimeErrorAction
. Additionally, a toolbox error message is automatically displayed to the MATLAB workspace. If an error occurs that is not explicitly handled by the toolbox, then the hardware-specific error message is displayed.
The default value for RunTimeErrorAction
is daqaction
, which displays the event type, the time the event occurred, the device object name, and the error message.
Run-time errors include hardware errors and timeouts. Run-time errors do not include configuration errors such as setting an invalid property value.
Samples Output Event. A samples output event is generated immediately after the number of samples specified by the SamplesOutputActionCount
property is output for each channel group member. This event executes the action function specified for SamplesOutputAction
.
Start Event. A start event is generated immediately after the start
function is issued. This event executes the action function specified for StartAction
. When the action function has finished executing, Running
is automatically set to On
and the device object and hardware device begin executing.
Stop Event. A stop event is generated immediately after the device object and hardware device stop running. This occurs when:
stop
function is issued.A stop event executes the action function specified for StopAction
. Under most circumstances, the action function is not guaranteed to complete execution until sometime after the device object and hardware device stop running, and the Running
property is set to Off
.
Timer Event. A timer event is generated whenever the time specified by the TimerPeriod
property passes. This event executes the action function specified for TimerAction
. Time is measured relative to when the device object starts running.
Some timer events may not be processed if your system is significantly slowed or if the TimerPeriod
value is too small. For example, a common application for timer events is to display data. However, since displaying data is a CPU-intensive task, some of these events may be dropped. To guarantee that events are not dropped, you may want to use the SamplesOutputAction
property.
Trigger Event. A trigger event is generated immediately after a trigger occurs. This event executes the action function specified for TriggerAction
. Under most circumstances, the action function is not guaranteed to complete execution until sometime after Sending
is set to On
.
![]() | Configuring Events and Actions | Recording and Retrieving Event Information | ![]() |