LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable VI runs at start

Hi,

I prepared an executable VI. It works fine but when I start it, it runs immediately. I dont want it to run immediately because I have to set some parameters on the vi. How could I fix it? I could not find any function about it.

Egemen
0 Kudos
Message 1 of 7
(2,902 Views)

Build another VI on top and select this as startup VI. This VI will ask for the parameters and call the now-used startup VI as subVI passing those parameters.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(2,898 Views)

I do not understand what you meant. I attached the execeutable. How could I do it?

 

Egemen
0 Kudos
Message 3 of 7
(2,888 Views)

When configuring the EXE build script, you selected one VI to be the "top level VI" aka Startup VI. This VI will automatically start to run when the EXE is called (double click).

So if you want the EXE to wait for parameters (dialog?), you have to implement this and exchange that with the top level VI. Of course, this new top level VI must call your previous top level VI as a sub VI.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 7
(2,875 Views)

@Norbert_B wrote:

When configuring the EXE build script, you selected one VI to be the "top level VI" aka Startup VI. This VI will automatically start to run when the EXE is called (double click).

So if you want the EXE to wait for parameters (dialog?), you have to implement this and exchange that with the top level VI. Of course, this new top level VI must call your previous top level VI as a sub VI.

 

Norbert


You mean like a state machine?

Egemen
0 Kudos
Message 5 of 7
(2,870 Views)

A statemachine is a framework pattern for VIs to execute "sub code" in a certain order.

So, essentially, you can use a statemachine for the new top level VI.

 

You can, on the other hand, of course introduce a statemachine in your now-top level VI with the first case to wait for parameters or to cancel. If parameters are passed, you go into your "normal application using those parameters", if cancel is pressed, you go to the cleanup/shutdown case.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(2,867 Views)

Thank you Norbert. I will try your suggestions.

Egemen
0 Kudos
Message 7 of 7
(2,859 Views)