Description:
This example is a Functional Global Variable which helps you merge any errors that happen across VIs that may not have direct wiring capabilities.
So far, I have used it in the Non-Blocking Multibutton Dialog Box example.
Instructions:
- Open the VI and look at its three states:
- Merge Error
- Read Stored Error
- Clear Stored Error
- Test the Functionality
- Create a sample error in the "Error In" control
- Run the VI once with "Merge Error" selected in the "Error Function" control
- Notice that Error Out should display the sample error created previously.
- Reinitialized the VI (Edit >> Reinitialize Values to Default)
- Run the VI with "Read Stored Error" selected in the "Error Function" control, and the original sample error should reappear in the Error Out indicator.
- The "Clear Stored Error" open is used for initializing the FGV and clearing any error that may be stored on the shift register.
- Implement it in your code.
- Make sure to clear the error stored in the FGV in an initialization section of the code.
- In any of the clean up/close sections of the code, place the FGV with "Merge Error" selected as an input.
- In the main portion of the code, using the "Merge Error" function will merge input (defaulted to no error) with the error stored on the shift register of the FGV.

