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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run when opened

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

0 Kudos
Message 1 of 16
(4,102 Views)
An exe should run when opened. Your program architecture is flawed if you don't use this.
0 Kudos
Message 2 of 16
(4,097 Views)

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.

0 Kudos
Message 3 of 16
(4,091 Views)

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.

0 Kudos
Message 4 of 16
(4,062 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 16
(4,057 Views)
It's there in the VI properties so that you can make a VI behave like an exe.

As I said, your architecture is flawed. You should design it so that you enter the values and then click on a button labeled Start or Run. There are numerous ways to do this. An easy mod would be to add a while loop that runs before your main loop.
0 Kudos
Message 6 of 16
(4,055 Views)

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.

0 Kudos
Message 7 of 16
(4,039 Views)

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.

0 Kudos
Message 8 of 16
(4,036 Views)

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.

0 Kudos
Message 9 of 16
(3,973 Views)

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.

0 Kudos
Message 10 of 16
(3,947 Views)