LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Invoke node for restart

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.

0 Kudos
Message 1 of 7
(2,924 Views)

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.

0 Kudos
Message 2 of 7
(2,904 Views)

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.

0 Kudos
Message 3 of 7
(2,897 Views)

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.

 

 

0 Kudos
Message 4 of 7
(2,893 Views)

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"

0 Kudos
Message 5 of 7
(2,889 Views)

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.

0 Kudos
Message 6 of 7
(2,864 Views)

@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.

0 Kudos
Message 7 of 7
(2,821 Views)