LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run when opened / labview exit when finished. A dangerous combination. How do I edit the VI now??

OK, I made a mistake.

I set the window properties of my VI to run when called, which is fine, that's what I want to do.

I then got clever and added a 'Exit LabView' icon at the end of my program.

This means:
a) I have no means of stopping the program to edit it, as LabView itself exits too, and
b) I feel silly.

Can anyone help? Is there a shortcut key to break the running?

Thanks,
Mike Evans
Mike Evans
TRW Conekt
N.I. Alliance Member, UK
http://www.Conekt.net
0 Kudos
Message 1 of 12
(3,768 Views)
what about creating a new vi and insert the "self - destruction - vi" as a sub vi
Message 2 of 12
(3,763 Views)
That will work.
Another option, which won't work if you set the stop button not to be seen, is ctrl+. which you can see if you look in the operate menu.

___________________
Try to take over the world!
Message 3 of 12
(3,756 Views)
Here's one way to do it.

Create a directory in your LabVIEW x.x directory named 'wizard', and save the attached VI there. If LabVIEW is running, you'll need to restart it, but then in the 'File' menu, you'll have a new selection named "Supress Run on Open...". Select this and you'll get a browse dialog to select the VI to open. It opens it by reference so it will not run.

This is saved in LabVIEW 6.1, but works fine on 7.0 and 7.1.

You can also open it by opening a blank new VI, drop the the vi that you want to edit as a subvi and opening it from the block diagram of the blank one you just created. It won't run when opened.

You can also try pressing the "Ctrl" and the "." keys together. If you haven't hidden your Abort button, this is the keyboard shortcut to it. This is a kind of a last resort since is will not let your applicaiton shut down properly.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 4 of 12
(3,752 Views)
Ctrl . (period) will stop a vi identically to hitting the abort button; however, this won't work if you've excluded the Operate menu. If you did that, there's a good change you also elminated the Window:Show Block Diagram option. In which case you can't just switch to the block diagram and hit the abort button. If your vi uses any subvi's you can open one of these and abort execution of the calling vi by aborting there. There are more methods if this doesn't get you where you want to be. I've had to resort to writing a quicky app to gain control of an app that had locked up using vi server methods, but that can be a bit more complicated.

Good luck,
Chris
Message 5 of 12
(3,751 Views)
One more technique. If the vi uses sub-vi's open one, break it, and then load the main vi. It should come up broken.

I think we have all done this before, hence the multitude of methods of getting out of it. I, of course, only did it that once, early in my LabVIEW days, when we only had three functions to choose from and two front panel elements, both controls. 😉


Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 6 of 12
(3,733 Views)
There have been all answers how to let your VI stop.

I attached an example how to avoid your situation. This way you can leave "Run when opened" set and have the expected stop. In the development system the VI will stop and will allow you go on editing and as application it will close the app normally.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 7 of 12
(3,726 Views)
Thank you all so much for your creative answers!

Since I had created sub-vis, and had also disabled the run/abort buttons, I found the easiest way was to 'break' one of the sub-vis by removing a wire and then opening the top-level app.

It's nice to know I'm not alone in having done this - I had a real Homer Simpson 'DOH!' moment as soon as I realised...!

Thanks again
Mike
Mike Evans
TRW Conekt
N.I. Alliance Member, UK
http://www.Conekt.net
0 Kudos
Message 8 of 12
(3,702 Views)

You don't even need it to have sub vi's within the problem one.  Just open any other vi and make an unsaved change.  When the EXIT command happens in the problem vi LabView will ask you if you want to save those changes to the other vi and bingo you have a chance to stop things and fix your problem.

0 Kudos
Message 9 of 12
(2,874 Views)

I'm sure the problem was solved. That thread ended seven years ago!Smiley Happy

 

No worries. I did the same thing myself more than once.

=====================
LabVIEW 2012


0 Kudos
Message 10 of 12
(2,863 Views)