User`s guide
Event Types
8-5
Event Types
The Image Acquisition Toolbox software supports several different types of events. Each
event type has an associated video input object property that you can use to specify the
function that executes when the event occurs.
This table lists the supported event types, the name of the video input object property
associated with the event, and a brief description of the event. For detailed information
about these callback properties, see the property reference list in “Image Acquisition
Toolbox Properties” on page 5-28.
The toolbox generates a specific set of information for each event and stores it in an event
structure. To learn more about the contents of these event structures and how to retrieve
this information, see “Retrieving Event Information” on page 8-8.
Note: Callbacks, including ErrorFcn, are executed only when the video object is in
a running state. If you need to use the ErrorFcn callback for error handling during
previewing, you must start the video object before previewing. To do that without logging
data, use a manual trigger.
Events and Callback Function Properties
Event Callback Property Description
Error ErrorFcn The toolbox generates an error event when a run-time
error occurs, such as a hardware error or timeout.
Run-time errors do not include configuration errors
such as setting an invalid property value.
When an error event occurs, the toolbox executes
the function specified by the ErrorFcn property.
By default, the toolbox executes the default callback
function for this event, imaqcallback, which displays
the error message at the MATLAB command line.
Frames Acquired FramesAcquiredFcn The toolbox generates a frames acquired event when
a specified number of frames have been acquired.
You use the FramesAcquiredFcnCount property to
specify this number.