To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview
This example demonstrates an architecture for a subVI that can be called throughout an application to collect all possible errors that have occurred and report them in a list, in the form of an Array Indicator. The subVI is designed in the form of a Functional Global Variable.
The attached files contains a LabVIEW Project with a Main Top Level VI called 'Main Error Handling Development.vi'. The main VI exists to demonstrate the use of the subVI 'ErrorHandlerFunctionalGlobal.vi'.
2. Description
The 'Dialog and User Interface' palette in LabVIEW contains many error handler VIs, such as the 'Simple Error Handler.vi' or the 'General Error Handler.vi'. These are useful for reporting a single error that can occur within a LabVIEW VI. In certain applications, multiple Error Cluster wires are used, such as in parallel architectures, or where custom error codes are used. The 'Merge Errors.vi' exists to merge the Error Clusters together, however, it only reports the first error, as oppose to concatenate a list.
The Main VI in this example goes through a For Loop to simulate going through a Test Sequence. Each Test in the Sequence will report a custom Error Code which is bundled into the Error Cluster. To use the example, follow the instructions added in the Front Panel and Block Diagram.
3. Requirements
4. Steps to Implement or Execute Code
5. Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.