Using Error Clusters

Use the error in and error out clusters in each VI you use or build to pass the error information through your VI. The error clusters are located on the Controls»Array & Cluster palette. 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.

Refer to Error Codes for a list of errors that LabVIEW reports for your platform. You can use the General Error Handler VI to define custom error codes and messages.

  1. Place the New Report VI located on the Functions»Report Generation palette on the block diagram and double-click it to open it.
  2. Select Window»Show Diagram or select <Ctrl–E> to display the New Report VI block diagram.
  3. Use the Context Help window or the 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, which are located in the Controls»Array & Cluster palette. On the block diagram, these clusters are wired externally to a Case structure.

If there is an error this 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 there is not an error, the VI this VI creates a new report.