LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I exit Labview environment when vi terminates

I Know how to set vi options to make my vi start executing when loaded. However, when the vi stops, the user is left in the development environment. How can I set it up so that Labview stops when my vi completes? I do not want to give the user access to the development environment.
 
John
0 Kudos
Message 1 of 9
(4,275 Views)
You should probably built your program into a standalone application. Do you have the application builder? (Included in LabVIEW professional and higher).
 
As an alternative if you don't have the application builder, you can call "Quit LabVIEW" as a last step in the program.
0 Kudos
Message 2 of 9
(4,265 Views)

Hi

Just as a reference, you can select from function palette > All Functions > Application Control > Quit Labview.

Goy

 

0 Kudos
Message 3 of 9
(4,261 Views)

Like Altenbach said, if you don't want the user to have any access to LV, you should uninstall it and build an application instead.

If you want to keep LV on the computer, you can password protect the VI by selecting File>>Save with Options. That way the user will not be able to modify the VIs.

If you do build it as an executable, you can use the attached VI, which will quit if you are running an executable or not quit if you are in LV.


___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(4,255 Views)

Thanks for the great feedback guys. I think what I want to do is just call Quit Labview.

John

0 Kudos
Message 5 of 9
(4,248 Views)

ne word of caution, If you don't want to build the application (because you don't have have app builder?) if you make the application run on load and quit of termination, by calling the exit application vi, future debugging can be a pain.  Do this only when you are done testing, otherwise it can be tricky to get back in your code.  I had quit this way in the past, and I had to break a subvi to get back in my code since it ran when I opened the main vi and quit from LV on termination, essentially locking me out of edit mode, don't lock your code too tight if you plan to maintain it.  I would agree though that the app builder is well worth the investment if you plan on any distribution of your program.  The app builder is a great tool and is so simple to use, unlike make files and builds in many other languages and environments.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 9
(4,240 Views)
And if you do get to use my VI, there is at least one bug in it - you should clear the error after the error handler or it will pop again after the property node.

___________________
Try to take over the world!
0 Kudos
Message 7 of 9
(4,238 Views)

Along these lines, Bloomy Controls has a nice VI that is a conditional stop.  It queries LabView to see if it is the run-time or the full version, and will stop the VI if it's the full version or quit if it's the run-time.  A simple VI that makes development and debugging easier for apps that you will ultimately deploy as a run-time. 

Here's the link:

http://www.bloomy.com/resources.php

 

 

Sheldon

Technical geek, engineer, research scientist, biodegradable...
Message 8 of 9
(4,235 Views)

Sheldon,

The conditional quit is a great idea, why didnt I ever think of that.  I usually avoid the exit command because of the debugging problem (ie quitting on normal execution while testing the vi).  Thanks for the link.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 9
(4,216 Views)