06-07-2018 02:09 AM
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
06-07-2018 02:33 AM
There is a Quit LabVIEW function in the Application Control palette.
06-07-2018 02:33 AM
you can use Quit LabVIEW, but read here
06-07-2018 02:47 AM
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.
06-07-2018 02:54 AM
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.
06-07-2018 03:16 AM
pincpanter is right, see my link, there are a discussion on how to make closing a program beautiful.
06-07-2018 04:08 AM
Is that you want me to use " [X] in the upper right corner" to close vi and then use "Quit LabVIEW" function
06-07-2018 04:26 AM - edited 06-07-2018 04:30 AM
@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.
06-07-2018 04:28 AM
@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.
06-07-2018 04:31 AM
no