LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

App.Kind difference between LV 2012 and 2013

Solved!
Go to solution

Hi,

 

I have a LabVIEW program that I have been building in 2012, but recently upgraded to 2013. The App.Kind Property Node sends the LV Environment to a Case Structure that determines whether to stop the program (Development Environment) or to close the program (Run Time Environment). Every build using 2012 closes the program without any issues, but when using 2013, the program stops, but my indicator output reads "Run Time System". Is anyone aware of a difference between 2012 and 2013 (Run Time or Development Environments) that would require I change something or that would suggest this would not work? Any help is much appreciated.

 

Below is an image of the Case Structure and the GUI's Indicator response during an Application execution.

 

Thanks,

Adam

 

ExitCaseStructure.JPGExitCaseStructure.JPG

0 Kudos
Message 1 of 6
(1,439 Views)

First of all, you should NOT be using the Quit LabVIEW primitive.  That is like crashing LabVIEW to stop your executions.  If this is your top level VI, just close the front panel with an Invoke Node and the LabVIEW Runtime Engine will close when all VIs are done running.

 

Secondly, use the Conditional Diagram Disable Structure instead.  It is more efficient and uses less space (no need for the property node to get the execution system).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(1,420 Views)
Solution
Accepted by topic author Adam.Kuhlman

I would suggest a different way of exiting.  Using that exit function is like pulling the plug on a computer before it shuts down.  Let the program shutdown naturally when it has no more commands to process.  

 

My suggestion is when your program first starts, check to see if the FP.Open is true.  If so, that means you are in development system and you won't be closing it when exiting.  If App.Kind is Runtime System, you will be closing.  So set a variable at the initialization phase of your VI and when it comes time to exit, check this variable and if you want it to close, use the FP.Close command.  Do nothing in the opposite case.  You have to make sure that your VI does actually exit because closing the front panel doesn't mean that the VI stops running.


aputman
LabVIEW 2017
LabVIEW Programming
Message 3 of 6
(1,409 Views)

aputman wrote:

My suggestion is when your program first starts, check to see if the FP.Open is true.  If so, that means you are in development system and you won't be closing it when exiting.  If App.Kind is Runtime System, you will be closing.  So set a variable at the initialization phase of your VI and when it comes time to exit, check this variable and if you want it to close, use the FP.Close command.  Do nothing in the opposite case.  You have to make sure that your VI does actually exit because closing the front panel doesn't mean that the VI stops running.


That sounds like way too much work.  Conditional Diagram Disable does it all for you and has the benefit of being removed from the compilation when in the development system.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 6
(1,392 Views)

@crossrulz wrote:

aputman wrote:

My suggestion is when your program first starts, check to see if the FP.Open is true.  If so, that means you are in development system and you won't be closing it when exiting.  If App.Kind is Runtime System, you will be closing.  So set a variable at the initialization phase of your VI and when it comes time to exit, check this variable and if you want it to close, use the FP.Close command.  Do nothing in the opposite case.  You have to make sure that your VI does actually exit because closing the front panel doesn't mean that the VI stops running.


That sounds like way too much work.  Conditional Diagram Disable does it all for you and has the benefit of being removed from the compilation when in the development system.


OK. 


aputman
LabVIEW 2017
LabVIEW Programming
0 Kudos
Message 5 of 6
(1,388 Views)

Thank you both for your help. I replaced the Exit with the FP.Close Invoke Node and it works! I really have no concern with time or effeciencty at this part of my application, so I can't justify changing structures if it works as-is.

0 Kudos
Message 6 of 6
(1,379 Views)