06-11-2025 05:39 AM
Hello,
I have one question maybe you know a better way to do it. Sometimes i run my program and make something stupid like no way to get out from while loop and i got error. Is there any way to stop this program without killing labview in taks manager? Because every time i have to do it and re-open every vi on project.
Here is example with this situation:
Clicking red :"stop" button not working because i have error and when i click continue it just shows again.
06-11-2025 06:50 AM
I wrote Abort.vi for this. I keep a copy on my desktop. It'll make a list of running VIs that you can selectively close.
06-11-2025 07:51 AM
The better way is to program in way you handle errors and stop based on the user button/command not by abort button or killing LabVIEW.
06-11-2025 09:19 AM
To stop a While Loop when there is an Error, simply wire the output of the Error Line (which you show on your picture of one case of your Block Diagram) to the conditional "Stop" indicator. About a decade ago, LabVIEW changed the Boolean functions (such as "Or") to allow either a Boolean or the Error Line (which is a Cluster, the first element of which is "status", True if there is an Error.
When you have a program with loops that you want to stop (or take some other action) if an Error occurs, use the Error line to trigger the "Do This on Error" condition (here, it was "Stop the Loop").
Bob Schor
06-11-2025 10:28 AM - edited 06-11-2025 10:33 AM
Under some conditions you can hold down "<ctrl>+." (i.e. keep holding down the <ctrl> and <period> keys) while clicking on the button on the error dialog.
(A more evil way to paint yourself into a corner is if you have subVIs set to dialog mode to be called later and accidentally leave their front panel open during debugging)
06-13-2025 08:40 AM
This'll help some.