Jump to content

[CR] Abort VI

Recommended Posts


Name: Abort VI

Submitter: jcarmody

Submitted: 22 Dec 2009

File Updated: 22 Dec 2009

Category: LabVIEW IDE

Version: 1.0.0

LabVIEW Version: 8.2

License Type: BSD (Most common)

Abort.vi v1.0.0

Copyright @ 2009, Jim Carmody

All rights reserved.

Author: Jim Carmody

LAVA name: jcarmody

Contact Info: Contact via PM on www.lavag.org

LabVIEW version:

Created and tested with LabVIEW 8.2


LabVIEW 8.2 or higher


Sometimes it happens that you're running a modal VI, you can't stop it and the only option you have to recover is to kill the LabVIEW process and start over. Running this VI will present a list (on top of your other modal VI) of all VIs running in all contexts (except NI.* and JKI.*). Select the one giving you trouble and this VI will abort it. Keep this VI handy and you'll never be stuck again.


*NOTE* This VI needs to be set to "Run when opened"; I purposely didn't set it for submission here because I think it's impolite. Take a look at the Block Diagram, satisfy yourself that it's safe (here be dragons, rusty nails and all), set the execution to run when opened, put the VI where it'll be handy and commence developing code secure in the knowledge that a UI mistake won't lock your LabVIEW process.

Known Issues:



This program was inspired by this thread in the NI forum.

Change Log:

v1.0.0: Initial release of the code.




If you have any problems with this code or want to suggest features:

please go to www.lavag.org and Navigate to

LAVA > Resources > Code Repository (Certified) and

search for the "Abort.vi" support page.


This code was downloaded from the LAVA Code Repository found at www.lavag.org

Click here to download this file

Link to comment

 I've rewritten this for the CR without the JKI State Machine.  As much as I love the JKI SM, and as much as it simplifies my job, I realize that not everybody has the VIP installed and won't be able to use Abort VI. So, if you've already downloaded it but were unsatisfied due to dependencies you don't have/want, you can download it again without them and give it a try.  I also disconnected the Enum from the Type Def so the VI can exist by itself.  I was going to do this for distribution but I wanted to leave it for folks to modify.  I hope this helps. 

Link to comment
  • 3 years later...

Thanks jcarmody!  I have a suggested improvement.  I was annoyed by the fact that once I changed the VI to run-when-opened, I could no longer edit the VI - I wanted to edit the VI description.  I had to re-download.  To make the VI editable, I modified it to use the variable (which you already had in place! nice!) Close Panel on Exit.  This starts out False but becomes True in Idle subcases 1, 2, and 3, i.e. if the user does anything.  So if the user doesn't do anything and the VI exits on account of being the only one running, then the front panel stays open.  And then you can edit it.



I put this at the end of the VI description: "To edit this VI, stop all other VIs first before using this one."

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.