Example Code

Error Source Style Call Chain in Single String Using LabVIEW

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
Demonstrates how to use the Call Chain function to create LabVIEW Error Source information of the Calling VI.

 

Description

When using the error cluster to return errors in your subVIs, it is common to use the Error Source string to return the call chain.  The Call Chain function in LabVIEW is helpful for finding this, however it returns an array of strings where each subsequent string is the caller of the previous VI.  This VI can be used in place of this to return a single string with the Call Chain information in the normal LabVIEW Error Source style.

 

Call Chain Example.png

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the Caller VI
  2. The "Caller VI" calls a subVI which generates and formats the Error Source information. 

 

Additional Information or References

Block Diagram of the VI:

 

Call Chain (Single String).png 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

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