Example Code

Creating and Clearing User-Generated Errors

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 

Overview

Uses Event Structure to output a user defined error or to clear it.

 

Description

This example employs the built-in LabVIEW error handling VIs to demonstrate how to inject and/or clear custom user-generated errors in your application. It uses an event structure and state-machine architecture to allow the user to investigate the various components of the Error Cluster from Error Code.vi.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. Fill the message and code that you would like to display on the error code.
3. Define if the error cluster will be an error or a warning.
4. Change the Enum to the desired action and watch the error out indicator being updated.
5. Finish the execution with the Stop Button.

 

Additional Information or References

Capture.PNG

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.