Main Content

EventLog

Store information about events

Description

The EventLog property is an array of structures that stores information about events. Each structure in the array represents one event. Events are recorded in the order in which they occur. The first EventLog structure reflects the first event recorded, the second EventLog structure reflects the second event recorded, and so on.

Each event log structure contains two fields: Type and Data.

The Type field stores a character array that identifies the event type. The Image Acquisition Toolbox™ software defines many different event types, listed in this table. Note that not all event types are logged.

Event Type

Description

Included in Log

Error

Run-time error occurred. Run-time errors include timeouts and hardware errors.

Yes

Frames Acquired

The number of frames specified in the FramesAcquiredFcnCount property has been acquired.

No

Start

Object was started by calling the start function.

Yes

Stop

Object stopped executing.

Yes

Timer

Timer expired.

No

Trigger

Trigger executed.

Yes

The Data field stores information associated with the specific event. For example, all events return the absolute time the event occurred in the AbsTime field. Other event-specific fields are included in Data. For more information, see Retrieving Event Information.

EventLog can store a maximum of 1000 events. If this value is exceeded, then the most recent 1000 events are stored.

Characteristics

Access

Read only

Data type

Structure array

Values

Default is empty structure array.

Examples

Create a video input object.

vid = videoinput('winvideo');

Start the object.

start(vid)

View the event log to see which events occurred.

elog = vid.EventLog;

{elog.Type}

ans = 
    'Start'    'Trigger'    'Stop'

View the data associated with a trigger event.

elog(2).Data
ans = 

             AbsTime: [2003 2 11 17 22 18.9740]
         FrameNumber: 0
       RelativeFrame: 0
        TriggerIndex: 1

See Also

Properties

Logging