NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Clearing a Specific Error From The Error Cluster

VERSION 7

Created on: Feb 18, 2009 12:00 AM by CaptainKirby - Last Modified:  Feb 19, 2009 12:15 PM by CaptainKirby

While the best error practice is to handle all errors, there may be times (such as user defined errors,) where you may want to simply clear an error. LabVIEW has a built in function called "Clear Errors" that will clear any error in an error cluster. In order to selectively clear an error with this VI, you need to check the error cluster first for your specific error, and then use the "Clear Errors" function.

 

The attached example creates a new subVI that allows you to input a specific error (or array of errors,) and then clear the error cluster when the appropriate error code is seen in the error cluster. The subVI is implemented as a polymorphic VI and is a good example of dynamically adapting to terminal inputs as well. The input can either be a single numeric error code, or an array of numeric error codes to check and clear.

 

 

Block Diagram of ClearSpecificErrorLV86 Instance

ClearSingleError.png

 

Block Diagram of ClearSpecificErrorsLV86 Instance

ClearErrorArray.png

In the attached files, "ClearSpecificError(s)LV86.vi" is the polymorphic VI. Both "ClearSpecificErrorLV86.vi" and "ClearSpecificErrorsLV86.vi" are instances of the polymorphic VI. You must have all three VIs to use the polymorphic VI. The two instances can be used as simple subVIs.

 

Downloads:
Average User Rating
(3 ratings)




Todd Sierer Todd Sierer  says:

Great stuff Captain!  Please add "LabVIEW" to the tags.

CaptainKirby CaptainKirby  says in response to Todd Sierer:

Thanks! Added the tag (and a few others.) Also fixed my screenshot (I hate when I can see the selection boxes on case structures in a screenshot.)

More Like This

  • Retrieving data ...