Using Error Clusters

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

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, source 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.

Refer to the ranges of error codes for a list of errors that LabVIEW reports for each platform. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. You also can use the General Error Handler VI to define custom error codes and messages.

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

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

  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.


Not Helpful