LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort All Running VIs

I ran into a probably where I had an infinite loop with a dialog click OK and was unable to stop the program. I found this post that noted you could press ctrl+. and hope it would work:
http://forums.ni.com/ni/board/message?board.id=170&message.id=66917&query.id=77559

One of the users specified that you could create a VI using VI server to abort all running VIs:
http://forums.ni.com/ni/board/message?board.id=170&message.id=66917&query.id=77559#M66917

I tried this, but it didn't seem to work.  I've attached my VI with a screenshot of the code (very simple).  What am I missing?

Thanks


Message Edited by Derek Price on 05-07-2008 11:36 AM

Message Edited by Derek Price on 05-07-2008 11:37 AM
Download All
0 Kudos
Message 1 of 13
(8,168 Views)
I think the problem is that your application property node is a direct reference to a specific application, not localhost at port 3363.  Also, you're using All VIs, not Exported VIs.
0 Kudos
Message 2 of 13
(8,160 Views)

Hi Derek,

i think the problem is that your vi is the first in the array and so it is the first that will be aborted. Smiley Happy

Mike

Message 3 of 13
(8,158 Views)
You need to exclude your "abort VI" from the list. Otherwise you're stopping yourself.


EDIT: Already answered by Mike while I was composing and posting. I sometimes wish these forums were psychic and would tell me not to bother. Smiley Very Happy


Message Edited by smercurio_fc on 05-07-2008 10:45 AM
Message 4 of 13
(8,155 Views)
I didn't even think of that!  Well, I removed my VI from the list and it still doesn't abort any running VIs.  I get these errors:

Error 1035 occurred at Invoke Node in Abort All Running VIs mod.vi

Possible reason(s):

LabVIEW:  Operation is invalid for this type of VI.

Method Name: Abort VI

Here's the updated VI (using OpenG VI to remove from the VI list array:


So what am I missing now?  🙂



Message Edited by Derek Price on 05-07-2008 01:58 PM
Download All
0 Kudos
Message 5 of 13
(8,116 Views)
You have a global VI in your list. Can't abort global VIs since they have no code. You can just ignore that error code, or remove global VIs from the list. Your choice.

P.S. You don't really need that OpenG VI in this case. A simple Delete From Array will work just fine. Smiley Wink


Message Edited by smercurio_fc on 05-07-2008 01:30 PM
0 Kudos
Message 6 of 13
(8,103 Views)
Using such a mechanism is dangerous...
If you abort one of the sub-VIs of the 'killing' VI you will kill the killer.
One of the options is ctrl-alt-del, cancel on the saving of VI, and don't execute the 'This program won't respond' message from Windows.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 13
(8,089 Views)

@TonP wrote:

If you abort one of the sub-VIs of the 'killing' VI you will kill the killer.

What subVIs? The "killing" VI has no subVIs (if the OpenG VI is replaced with the primitive function.)
0 Kudos
Message 8 of 13
(8,084 Views)
Jeff,
What is the difference between All VIs and Exported VIs?  I just tested it and got identical lists.
Jim

LV 2020
0 Kudos
Message 9 of 13
(8,063 Views)
The "Exported VIs" refers to the VI Server. From the LabVIEW Help:
Returns a list of exported VIs in memory. This property is similar to the Exported VIs option on the VI Server: Exported VIs page of the Options dialog box.
The VI Server: Exported VIs page has this:
  • Exported VIs—Lists the VIs that can be exported. You also can use the Server:VI Access List property to list programmatically the VIs on the VI Server that are accessible by remote clients.

0 Kudos
Message 10 of 13
(8,061 Views)