This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How Do I Ignore a Specific Error in LabVIEW?

Updated Aug 22, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am receiving an error in LabVIEW, but I have confirmed that it is not negatively affecting my application. How can I ignore or clear this error?

My LabVIEW code is stopping because it gets an error, but I would like the code to continue even after I get this error. How can I do this?

Solution

There are three different methods for ignoring errors.

Clear Error VI LabVIEW 2014 and later
In LabVIEW 2014 and later, the Clear Error VI has an input for the specific error code to clear. This allows an error to be cleared without having to unbundle it and send the code to a case structure. This is good for ignoring a specific error, but if you want to ignore multiple errors, using the case structure is a better option.

General Error Handler VI
To make LabVIEW ignore a specific error, you can use the General Error Handler VI or the Clear Error VI. 

The General Error Handler VI is located in the Programming » Dialog & User Interface palette. Right-click on the terminal [exception action] and create a constant. Set that constant to cancel error on match. Then wire the error number you wish to cancel to the [exception code] terminal. This will remove that error from the error cluster that matches the exception code you wired in. 


Clear Error VI LabVIEW 2013 and earlier
You can also write your own logic to clear an error using the Clear Error VI, also located in the Programming » Dialog & User Interface palette. 

To do this in LabVIEW 2013 and earlier, use the Unbundle By Name function to unbundle the error code. Then use a case structure to take an action based on the error code. The following block diagram implements this method to watch for a particular error, and then clears that error only. This method also allows you to watch for several errors and take different actions based on the specific error.

 

Additional Information

The LabVIEW images in this article are included as VI attachments.