Using Error Clusters

Use the error in and error out clusters in each VI you use or build to pass the error information through the VI. In most cases, the source cluster element also identifies where the error occurred. If error in detects an error, the VI returns the error information in error out and does not continue to run. By default, LabVIEW automatically handles any error when a VI runs by suspending execution, highlighting the subVI or function where the error occurred, and displaying an error dialog box. You can disable automatic error handling.

Complete the following steps to see an example of how to use the error clusters in a VI.

  1. Add the Create Report VI to the block diagram and double-click it to open it.

     Add  Find
  2. Select Window»Show Block Diagram to display the block diagram.
  3. Use the Context Help window or the VI Hierarchy window to locate the Generate Report Create VI.
  4. Double-click the Generate Report Create VI to open it. Notice that the front panel includes the error in and error out clusters. On the block diagram, these clusters are wired externally to a Case structure.

If an error occurs, the Case structure executes before reaching this VI. The VI does not execute the main code but instead passes the error information straight through the Case structure to the error out cluster. If no error occurs, the VI creates a new report.

Related Information

Using the Standard Functionality for error in Parameters

Using the Standard Functionality for error out Parameters

Simple Error Handler VI

General Error Handler VI

Defining Custom Error Codes Using the General Error Handler VI