LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building exe help...

Hi Guys.... Is there a way to make an .exe file from my VI, but when this exe starts.. it dosen´t run.... so I can change some configuration about the VISA stuff... Right now I made one but when I double click it starts running... how can I change that.... ???? tnx in advance..
0 Kudos
Message 1 of 4
(2,993 Views)

Code it as a proper state machine and make sure it starts running in an idle state where you can configure things, for example.

 

Since you cannot edit a built executable, "running" is the only useful state. All other programs on your computer (browser, word processor, etc.) all run when opened, so why should a LabVIEW application be any different? Right?!

0 Kudos
Message 2 of 4
(2,988 Views)

Looks like the vi you have written does a single functionality like for example adding two number and when a exe is created it staright away executes (when double clicked) adding the default numbers (i.e 0+0=0)

 

Its always better to have a design like the state machine or the event structure where the vi or the exe will wait for some user input and then will act accordingly. So i suggest you to modify the code using any of the design patterns. Search for "design Pattern" in ni.com for details for knowing about design patters.

 

Now as a quick solution for your question (Strongly i DO NOT recomment this)

1) Click on the VISA resource and select a port (say COM 1) and right click on this control and select make current value default from the pop up. Perform the same for other controls (for defaulting values). Now create an exe, There should not be any prolem (hopefully)

 

2) You can create an file and store all the values which will then gets populted on to the control while the exe executes.

So when ever you want to make some changes you can just edit this file.

 

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 3 of 4
(2,986 Views)

Hi Luigi77!

 

On the settings for the creation of the executable, there is a setting called: Run when opened. Depending on which version of LV you have is where you can find this. On2009, its on the Source File settings, select Customize VI Properties and uncheck the mark for that option.

 

Now when you double click your VI, it should open but the run arrow will be white, waiting for you to click it to start running.

 

Hope this helps!

 

Take care!

0 Kudos
Message 4 of 4
(2,956 Views)