04-21-2010 12:06 AM
04-21-2010 12:15 AM
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?!
04-21-2010 12:19 AM
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
04-21-2010 12:50 PM
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!