LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill a running VI?

Hi All,
 
I was looking through the examples provided by NI for Labview 8. I opened the example called "Simple case structure.vi" and executed it.
Once I selected a negative number, a popup came on and it said "Error, Negative number". The problem is that I keep pressing OK and the message just comes back again and I have no way of changing the input value.
 To correct this example, I would suggest that once a negative value is introduced, the program should reset the input box to 0.
My question is how can I stop this task from within Labview? I tried Ctrl + . and many other variations, but none allowed me to stop the execution. I preffer not to kill the whole Labview from within Windows.
 
Regards,
Nick
0 Kudos
Message 1 of 6
(9,371 Views)
The example is buggy for sure.  The pop up takes focus and you can't do anything else while it is being displayed.  You can try to be real quick and put your mouse on the abort button.  Quickly press the return key and then the mouse click on abort.  If you are quick enough, you can catch the action before the pop up comes back and the vi will be aborted.  Otherwise, use task manager to kill LV, then fix the bug in the example and save it to a new file for future reference.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(9,367 Views)
Hi Nick (tbob),
      I can't run the [LV8] Example, but sometimes the key-combination [ctrl][period] can get us out of a jam. Smiley Wink
 
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 3 of 6
(9,351 Views)

hi there

i run in this situation from time to time, so i wrote a little VI-killer tool (see attachment). the killer must be run as an executable, make sure to enable VI - server and VI server TCP/IP access. the killer kills all VIs in the local LabVIEW.exe instance listed in KillList.txt. KillList.txt must be placed in the same directory as the Killer - executable.

if you wantt to kill a VI that is locked due to a dialog box you have to press the dialog box button once again.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 4 of 6
(9,343 Views)

Usually when I have a VI I cannot stop due to an error I coded in the VI the vi has a menu I created. (RTM file)

 

To get around this, I exit the app with Task Manager. This allows me to get a pop-up that offers an option to save my work. (LV 6.1)

 

Once out, I rename the RTM file so the program cannot find it. A default menu appears next time I run the program. CTRL . now works. I can go in and fix the errors of my ways. Then I exit and save.

 

Of course I have to rename the RTM file back to allow LV to see it on next running.

 

This has save me on several occasions.
 
These event structures will be the death of me.....
 
I hope this helps any other programmers that feel stuck when CTRL . does not appear to work.
0 Kudos
Message 5 of 6
(9,089 Views)
Doug, you do realize that you responded to a post that was made a year and a half ago, don't you?
- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(9,082 Views)