Documentation Center

  • Trial Software
  • Product Updates

RuntimeErrorFcn

Specify callback function to execute when run-time error occurs

Description

    Note:   You cannot use the legacy interface on 64–bit MATLAB®. See Session-Based Interface to acquire and generate data.

A run-time error event is generated immediately after a run-time error occurs. This event executes the callback function specified for RuntimeErrorFcn. 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 RunTimeErrorFcn is daqcallback, which displays the event type, the time the event occurred, and the device object name along with the error message.

Run-time error event information is stored in the Type and Data fields of the EventLog property. The Type field value is Error. The Data field values are given below.

Data Field Value

Description

AbsTime

The absolute time (as a clock vector) the event occurred.

RelSample

The acquired (AI) or output (AO) sample number when the event occurred.

String

The descriptive 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.

Characteristics

Usage

AI, AO, common to all channels

Access

Read/write

Data type

String

Read-only when running

No

Values

The default value is daqcallback.

See Also

Functions

daqcallback

Properties

EventLog, Timeout

Was this topic helpful?