LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent a LabVIEW executable from automatically running when brought up the first time?

LabVIEW excutables run automatically when started the first time. I need to change my inputs when running the first time. So the first run is useless without changing the input. I tried using the "STOP" command if I do not give an input (or if the input is the default - invalid). This works in stopping the first automatic run. And it works in running after applying the proper input. But it stops further runs. I cannot duplicate the error in the non-executable version. And I need to be able to run the executable about 100 times a day (using it in a production test program).
0 Kudos
Message 1 of 6
(3,286 Views)
Sateesh,

Try going into the source (the VI) and then changing the properties of the VI. File-VI properties-execution, and check if the "run when opened" box is checked. If it is, then u might have to uncheck it and then go ahead and go to the window appearence peoperties and check/uncheck the show run and stop button appropriately so that the .exe shows the run and stop button in order for you to run it when you are ready.

Another way can be using a differnt run button on the front pannel (see the attatchement) which will decide the execution of your program.

Good luck.
Hope this helps.

Parikshit.
0 Kudos
Message 2 of 6
(3,286 Views)
Hi,

The executable builder automatically sets the 'run when opened' by default.
To change this, in the application builder, on the 'VI Settings' tab, select the top level VI and then click
'Edit Build Settings'. A dialog box opens with a list of target settings and actions, click on the action next
to 'Run When Open' and change it to 'no'.

I hope it helps,

Tim

Pari wrote:

> Sateesh,
>
> Try going into the source (the VI) and then changing the properties of
> the VI. File-VI properties-execution, and check if the "run when
> opened" box is checked. If it is, then u might have to uncheck it and
> then go ahead and go to the window appearence peoperties and
> check/uncheck the show run and stop button appropriately so that the
> exe shows the
run and stop button in order for you to run it when you
> are ready.
>
> Another way can be using a differnt run button on the front pannel
> (see the attatchement) which will decide the execution of your
> program.
>
> Good luck.
> Hope this helps.
>
> Parikshit.
>
> ------------------------------------------------------------------------
> Name: Run_when_enabled.vi
> Run_when_enabled.vi Type: LabVIEW Instrument (application/x-unknown-content-type-LabVIEWInstrument)
> Encoding: base64
> Description: Example.....check this out, Sateesh.
Message 3 of 6
(3,286 Views)
If I understand correctly, you start the application clicking on the "Run" arrow each time you want your test program done.
Indeed the Top Level VI runs by default when opening in an application so you can't control the first run. This can't be avoided. Even if you change the setting of the VI in the Application builder to not run when opened, this setting is overridden for Top Level VIs.

You have to rework your user interface a little. Put all your code in a while loop with a stop boolean button wired to the loop terminal. Add another boolean "TEST" and a case statement that will execute the test code when the user clicks on "TEST". In the loop add a small wait of 100-250ms to avoid that the loop runs wild polling the booleans when it is idle.


That is not the usual way to Run an application using the Run button. Usually the application enters in a loop until the user put it to stop with a stop button on the front panel. Then the application terminates and closes its window. That is what the user expects from the standard user interface.


LabVIEW, C'est LabVIEW

Message 4 of 6
(3,286 Views)
I would agree with the previous post ... really the only point of
creating an executable is that you then are not bound by the "one
computer license" of your development system anymore. At the same time
that also implies you have multiple users and, as a courtesy to them, it
might be a good idea to have a "program", not a "hack" ...

just my $.02,

Rudolf
0 Kudos
Message 5 of 6
(3,286 Views)
I agree with Jean-Pierre. That's really the way executables are meant to work. When I build EXEs the user never even sees the FP when its not "running".
0 Kudos
Message 6 of 6
(3,286 Views)