Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Recording and Retrieving Event Information

For some of the events listed above, certain information is automatically stored in the EventLog property. EventLog is a structure that contains two fields: Type and Data. The Type field contains the event type. The event types that are logged for analog input objects are start, stop, trigger, runtime error, input over-range, and data missed events. Data-available events and timer events are not logged to EventLog.

The Data field contains the event-specific subfields shown below.

Table 4-8: EventLog Subfields
Events
Data Subfield
Description
All events

TimeStamp

The absolute time the event occurred.

SampleStamp

The number of samples acquired when the event occurred. The sample count begins when the start function is issued. A value of -1 indicates the engine was not running when the event ocurred.

Trigger

Channel

Which channels caused the trigger to be issued (used only for software triggers).

Trigger

The trigger number

Input over-range

Channel

The channels that experienced an input over-range condition

Direction

Indicates if the over-range condition switched from "On" to "Off" or from "Off" to "On".

Data missed

Channel

The channel(s) from which data was missed.

The example below illustrates how you can retrieve event information.

Example: Retrieving Event Information

Suppose you want to examine the events logged for the voice activation example on page 4-32. You can do this by accessing the EventLog property.

By examining the contents of the Type field, you can list the events that occurred during this acquisition.

Note:
Unless a runtime error occurs, all acquisitions must have a start, trigger, and stop event.

The Data field of the trigger event recorded the absolute time the trigger occurred, the number of samples acquired since the start event occurred, the index of the trigger channel, and the trigger number.



[ Previous | Help Desk | Next ]