09-03-2013 11:26 AM
I recently discovered an invoke node under App that allows you to restart LabVIEW. The help at http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/app_restart/ states that it works in the run-time. However, when I run this in an executable, it simply quits the applcaition and doesn't really restart it. I'm using LabVIEW 2011. Ideas anyone?
Its a really handy tool to restart an application say once every 24 hours, if it works as advertized.
09-03-2013 02:56 PM
I think what this is intended to do is to restart the LabVIEW Development system, the thing you use to program in LabVIEW. When you build an executable, that runs "outside" the Development system.
09-03-2013 03:00 PM
If you really are looking to restart your application I would suggest running a batch file from your EXE, which kills your EXE, then runs it again.. Of course only do this after you've finished cleaning up any processes you were in the middle of, and closing any open references.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-03-2013 03:03 PM
The help says its available in the Run-time environment. Doesn't that mean EXEs as well? I know it restarts LabVIEW, but that's really not useful in my use case. I would like to restart the applicaiton once a day to ensure stabilty.
09-03-2013 03:05 PM
The batch file is a workable solution and that's how I have implented it currently. However, using built in LabVIEW features is always my preference. But I am tempted to think that Batch files is really the only solution.
For reference for others, the text in the batch file that I create is
timeout /t 60
start "App" "Application.exe"
09-03-2013 07:06 PM
Except that the invoke node is called "Restart LabVIEW". Your .exe is not LabVIEW. It is its own compiled application.
It is kind of confusing that it says it works in the "run-time environment". Perhaps some from NI can explain better what that means for this invoke node.
09-05-2013 07:56 AM
@RavensFan wrote:
Except that the invoke node is called "Restart LabVIEW". Your .exe is not LabVIEW. It is its own compiled application.
It is kind of confusing that it says it works in the "run-time environment". Perhaps some from NI can explain better what that means for this invoke node.
I would guess that this means it will restart the Run-Time Engine. Something like kill the RTE DLLs and then start them again? In either case, I would call this a bug. If NI disagrees, I say add it to the idea exchange because it could be a useful feature.
Hey I wonder how Deploy does it? The demo I saw was with automatic updates, where it detects an update, prompts to update then closes the software installs the new update and restarts the application.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord