LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop running program with error

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:

bonczas_0-1749638144779.png

Clicking red :"stop" button not working because i have error and when i click continue it just shows again.

 

0 Kudos
Message 1 of 6
(356 Views)

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.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 6
(334 Views)

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.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 6
(319 Views)

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. 

Stop on Error.png

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 

 

Message 4 of 6
(291 Views)

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)

0 Kudos
Message 5 of 6
(278 Views)

This'll help some.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(237 Views)