Instrument Control Toolbox    

Storing Event Information

You can store event information in an action function or in a record file. Event information stored in an action function uses two fields: Type and Data. The Type field contains the event type, while the Data field contains event-specific information. As described in Creating and Executing Action Functions, these two fields are associated with a structure that you define in the action function header. Refer to Debugging: Recording Information to Disk to learn about storing event information in a record file.

The event types and the values for the Type and Data fields are given below.

Table 3-10: GPIB Event Information 
Event Type
Field
Field Value
Bytes available
Type
BytesAvailable
Data.AbsTime
day-month-year hour:minute:second
Error
Type
Error
Data.AbsTime
day-month-year hour:minute:second
Data.Message
An error string
Output empty
Type
OutputEmpty
Data.AbsTime
day-month-year hour:minute:second
Timer
Type
Timer
Data.AbsTime
day-month-year hour:minute:second

The Data field values are described below.

The AbsTime Field.   AbsTime is defined for all events, and indicates the absolute time the event occurred. The absolute time is returned using MATLAB's clock format.

The Message Field.   Message is used by the error event to store the descriptive message that is generated when an error occurs.


 Event Types and Action Properties Creating and Executing Action Functions