Table Of Contents

Generating Errors in a Real-Time Sequence

Last Modified: June 10, 2021

Configure a real-time sequence to return user-defined error codes and messages in the stimulus profile test results file.

  1. Create a real-time sequence.
  2. Add a Generate Errors primitive to the sequence code.

    This primitive also allows you to stop the sequence and skip to the clean-up tasks or to immediately abort the sequence without performing clean-up tasks.

  3. If you need to clear or access an error later in the sequence, create an expression in the Property Browser that implements a function.
    Goal Function
    Clear the last error so it does not appear in the test results file. clearlasterror
    Return the numeric error code of the last error. getlasterror
The test results file displays the error information in the section that corresponds to the sequence that generated the error. The following example shows how an error appears in the test results file:

Outcome: Error: 55. Details: <append>========================= VeriStand: Alert! The Engine Temperature is outside the critical range. Shutting down the engine.

Recently Viewed Topics