LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build executable that doesn't run on execution

I want the user to start my executable by clicking on the run arrow.  The way my executable works now is that the program starts running automatically when the executable starts.  I tried changing the VI properties, but I haven't been able to get the results I want.  Any ideas?

 

Thanks in advance.

0 Kudos
Message 1 of 6
(3,493 Views)

When you set the properties in the builder for the .exe, go to the advanced tab and select enable debugging and also Wait for Debugger on Launch.

 

There may be other ways of doing this, but this is one I just used becaused I needed to do those exact things for the remote debugging I wanted to do.

Message 2 of 6
(3,491 Views)

Hi jrdudels,

 

usually I hide the toolbar for executables and make my own start button which is polled in a small while loop (in smaller vis) or checked in an event structure (in bigger projects)...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(3,473 Views)
0 Kudos
Message 4 of 6
(3,470 Views)

Once a LabVIEW program is built into an executable, it should act more like a regular windows program. The run button is part of the development environment and users should not need to do any LabVIEW specific mouse gynmastics to run the program. What good is an non-running exeutable? You cannot edit it anyway!

 

The correct way is for the executable to have the toolbar hidden and to be set to run when opened and close itself when done. Typically, the program should start up in a wait state and then execute other states as directed by the operator. An executable that is not running makes little sense. When was the last time you stopped and started a non-labview executable?

 

Can you tell us your reasoning why you want to set it up like that? 

Message 5 of 6
(3,454 Views)

Although I agree with your post, for the most part, altenbach and follow those practices when making LabVIEW applications for other people... I've been in a situation where I needed a compiled VI not running at start up.  I needed a quick-and-dirty producer consumer data recorder for my own use for a test.  My priority was getting the testing done for the client, and having my labview application run on a computer that had specific hardware but not labview.  My priority was to get the job done, not play in labview for those 5 extra unnessary minutes.

 

I know a lot of you are trying to engage people to think critically about what it is they are trying to acomplish...but just because YOU think something should be someway inparticular doesn't mean that it is the best way for all situations.  Thank God NI sees it that way as well, and gives the developer flexibility to have it the way they want it.

Message 6 of 6
(3,439 Views)