To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The example shows a very simple infinite loop. Once you have run the code, you will be relentlessly prompted by a dialog box. Within 50 ms of closing the dialog box, you will be greeted by another! This leaves no time to manually click the stop button or the abort button.
Description
Of course, the best way to get out of infinite loops is to avoid coding scenarios which allow then to occur. However, it only takes a short lapse in developer concentration to accidentally write and run an infinite loop. To get around this issue, you can hold ctrl + . (full stop), while you click the OK button. This is the LabVIEW shortcut for “abort”. Of course, hitting abort is not a graceful method of stopping a VI... but, it is a little less “brute force” than forcing LabVIEW to close via task manager (the method I used to use before learning this technique). The following piccie illustrates an amusing infinite loop scenario!! (this image is with gratitude to the wonderful, sharp, brilliant nerds at XKCD web comics)
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**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.
Ahhhh, so that's how I was meant to do it all along!