LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop and Quit LabVIEW Vi in Development Environment

Hi,

I am launching and executing a VI through CMD line.

once done I would like to stop and close LabVIEW application programmatically.

 

Thanks

Visuman

0 Kudos
Message 1 of 12
(2,639 Views)

There is a Quit LabVIEW function in the Application Control palette.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 12
(2,631 Views)

you can use Quit LabVIEW, but read here

0 Kudos
Message 3 of 12
(2,630 Views)

Thanks for reply.

I know we can use Quit LabVIEW function --> but its like abrupt shutdown.

I am looking for way where LabVIEW will perform Safe/Procedural shutdown.

in case I am using "Quit LabVIEW' function some times I am LabVIEW Crash report, which I don't want to happen. 

0 Kudos
Message 4 of 12
(2,623 Views)

No, it's not. Your vi must do a proper shutdown of all its activities and only at the end of all loops and subvi's call Quit LabVIEW.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 12
(2,612 Views)

pincpanter is right, see my link, there are a discussion on how to make closing a program beautiful.

0 Kudos
Message 6 of 12
(2,602 Views)

Is that you want me to use " [X] in the upper right corner" to close vi and then use "Quit LabVIEW" function

0 Kudos
Message 7 of 12
(2,586 Views)

@visuman wrote:

Is that you want me to use " [X] in the upper right corner" to close vi and then use "Quit LabVIEW" function


Where does the provided link say you should use the [X]? TL;DR

 

The link is in fact a bit confusing. In that example, the only way to stop is by the close button. Your application has it's own logic to stop (automatically, when done).

 

Make all your code do their proper closing when done, then call Quit LabVIEW.

0 Kudos
Message 8 of 12
(2,578 Views)

@visuman  ha scritto:

Is that you want me to use " [X] in the upper right corner" to close vi and then use "Quit LabVIEW" function


No, we don't, there is no need of user intervention, in principle, unless actually required by your application.

The main vi would do whatever is programmed to do, then would stop executing. Usually on stop the vi will not close itself.

If you added a user controlled While Loop or Event Structure to let the user select specific functions to be executed, then the user should also actively close the vi with an Exit button or even the [X]. It's advisable to manage the [X] in an Event Structure (it's an Application Close event).

After all operations are done, either automatic or user specified, call the "Quit LabVIEW" function.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 9 of 12
(2,576 Views)

no

 

fin.png

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