Programmatically Access Error Codes in the LabVIEW Block Diagram

Updated Oct 2, 2018

Reported In

Software

  • LabVIEW

Issue Details

I would like to select and pass built-in error codes throughout my block diagram. Is there a function by which I can select and programmatically add error codes to my VI?
 

Solution

Yes, you can add the Error Ring to your block diagram to programmatically introduce an error code of your selection. For example, the picture below illustrates how one can merge an error code from the error ring (no error has been selected) with another error from another part of the code.

To insert the error ring into your block diagram, follow these steps:
  1. Open up the programming -> Dialog & User Interface palette
  2. Select the Error ring and place it in your VI
  3. Once inserted, press the selection arrow on the Error ring node to select an error.
Find more information about this function in: Selecting Built-In Errors from the Error Ring.

Additional Information

  • You can also also use Error Rings to create a custom error message: Defining a Custom Error Code from the Error Ring
  • Always include the call chain to help the developer debug errors, unless you’re using them in LabVIEW Real-Time. Getting the call chain is a performance hit because appending the Call Chain (where the error is generated) makes LabVIEW allocate dynamic memory for a string, which can lose determinism in your application.

WAS THIS ARTICLE HELPFUL?

Not Helpful