jcarmody Posted December 23, 2009 Report Share Posted December 23, 2009 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 Dependencies: LabVIEW 8.2 or higher Description: 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. Instructions: *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: None Acknowledgements: This program was inspired by this thread in the NI forum. Change Log: v1.0.0: Initial release of the code. License: BSD Support: 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. Distribution: This code was downloaded from the LAVA Code Repository found at www.lavag.org Click here to download this file Quote Link to comment
Mark Balla Posted December 23, 2009 Report Share Posted December 23, 2009 Certified 12-23-09 and placed in LabVIEW IDE Quote Link to comment
jcarmody Posted December 23, 2009 Author Report Share Posted December 23, 2009 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. Quote Link to comment
vugie Posted December 29, 2009 Report Share Posted December 29, 2009 Jim, you saved me at least 2 hours today Thank you. Quote Link to comment
torekp Posted December 5, 2013 Report Share Posted December 5, 2013 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." 1 Quote Link to comment
jcarmody Posted December 5, 2013 Author Report Share Posted December 5, 2013 I just drop it on the Block Diagram of another VI and open it from there. It doesn't run when opened that way. That variable is from the JKI State Machine, from which I refactored this VI because not everybody uses it. 1 Quote Link to comment
torekp Posted December 5, 2013 Report Share Posted December 5, 2013 Doh! Never thought of that Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.