Example Code

Error Handling with Without Stopping Program

Code and Documents

Attachment

Overview
This example demostrates a method for alerting the user of an error without interrupting your program's operation.

 


Description
This would be useful when you expect to receive an error that would normally require the user to select "continue" in order for the VI to keep running, and will instead ignore the specified error code, set a boolean indicator to true, and erase the error code to allow the VI to keep running.

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the attachment to your computer
  2. Open the VI "Error Handling 2012 NIVerified.vi"
  3. Run the VI

 

Additional Information or References
VI Snippet

 VI Snippet.png

 

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

 

National Instruments

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

Comments
GabbyG
Active Participant
Active Participant
on

Hi

This is a way, with a lot of prior knowledge of what the users response would be.

But please connect the ErrorHandler input before the Erase.

Gabi

7.1 -- 2013
CLA
C-Dav
NI Employee (retired)
on

You are so very right, oversight on my part.  Thanks!

For the application this was created for there was a very specific error code that was expected.  Using that error was the best method to notice a change in the environment without interrupting a portion of the program (it WOULD interrupt another portion).

National Instruments
dfjuggler
Member
Member
on

Nice, ChizzDizzle. You might also want to check out the Structured Error Handler Reference Library.