From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-20-2015 08:10 AM
Hi
I am using LabView 2012. I tried to make an exe file of my vi that does not run when opened. By starting from a blank project and introducing my vi and the files and sub vi's needed, I did not succeed. The application always opens in the run mode. In the vi properties the run when opened button was unchecked, in the source file settings, customize, I unchecked the run when opened button, but nothing was effective.
However, if I start from the tools button in the vi front panel, the process proceeds differently. Instead of 'always included' in the source file settings it now says 'start up vi' and unchecking the run when opened button in the customize settings now is effective. After this the application indeed does not run when opened.
I have seen a lot of messages concerning this problem, but from the answers I could not get a grip on the solution.
Is this problem still a bug in LabView?
muonlab
03-20-2015 08:14 AM
03-20-2015 08:18 AM
It is not a bug in LabVIEW.
A VI has a run when opened setting. You can override that setting when the VI is included in an executable based on the settings you check in the applicaiton builder. I don't know why you think there is a bug within how LabVIEW handles these settings.
And has Dennis said, the startup VI should run when opened. The default project settings support this. You can deviate from that, but it is not normal practice.
When was the last time you opened Microsoft Word, Excel, AutoCAD or any other commerical piece of software and needed to press a "RUN" button before you could start working with it.
03-20-2015 11:18 AM
Thank you for your answer, but if it is true what you say, why does LabView introduce a 'run when opened' check mark as well in the vi properties as in the application builder? In executing the application I use the 'run' button to start execution after I have chosen the values of the parameters, voltages etc. that I am going to use in the experiment.
03-20-2015 11:22 AM
@muonlab wrote:
Thank you for your answer, but if it is true what you say, why does LabView introduce a 'run when opened' check mark as well in the vi properties as in the application builder? In executing the application I use the 'run' button to start execution after I have chosen the values of the parameters, voltages etc. that I am going to use in the experiment.
Event Structures are great way to accomplish the same thing.
03-20-2015 11:26 AM
03-20-2015 11:37 AM
The run, pause, abort buttons don't even belong in a VI that is built into an .exe application.
It's in the VI properties so you can work with it, open it up, and debug when coding in the development environment. It is in the app builder so you can override those settings and make it run when opened when built into an .exe and not have to keep changing it in the VI properties every time you go through a test, build, run exe, test, Repeat debug cycle.
03-20-2015 11:41 AM - edited 03-20-2015 11:42 AM
I think disabling the "run when opened" setting in the build specification was buggy in certain LabVIEW versions. Don't remember the details, but you seem to bump into it...
Still, there is never a need to have an executable in non-running mode. That would be just a ridiculous setting. It means that your users would need to be familiar with the LabVIEW environment (where is the run button?) in addition to the specific software instructions.
Design your application as a proper state machine and make sure it starts up in the idle state where inputs are accepted and validated (you cannot programmatically validate inputs if the Vi is not running! (e.g. check if all inputs have been entered, etc.) Once the VI determines that all settings are good, it can unlock the code that allows further processing, and so on.
03-24-2015 08:56 AM - edited 03-24-2015 08:57 AM
The example I try to give is something like "When you open Internet Explorer do you then need to click the Run button before the application starts loading a page? Or when you open Microsoft Word do you then need to click Run before you can start a document?" Create your application to not use the debugging features of an IDE because you should expect them to be there when you build an application.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-24-2015 04:35 PM
There might be a misunderstanding, I am not a professional and from time to time get confused by the many possibilities of LabView. Although I am able to understand what people try to clarify me by remarks about Word and Excel.
In my practice I provide my students with an application of my vi together with an installer. I ask them to install and start to do measurements with their computers by first choosing voltages, thresholds etc. and next clicking the white arrow 'run' button at the left hand corner of the application interface. I am sure I could do better by introducing a 'start' button in my vi, but my students work perfectly in this way.
"There is no confusion like the confusion of a simple mind"
Scott Fitzgerald, The great Gatsby.