cancel
Showing results for 
Search instead for 
Did you mean: 

Compiled vi always runs when opened, Labview 2013 bug?

Highlighted
LarsM
Member

Compiled vi always runs when opened, Labview 2013 bug?

I'm presuming it's not a bug, but right now it looks like that:

 

I compile a vi to an exe using the application builder, but no matter how I adjust the settings, the vi will always run when opened.

 

I'm running LabVIEW 2013.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
22 REPLIES 22
GerdW
Knight of NI

Re: Compiled vi always runs when opened, Labview 2013 bug?

Hi Lars,

 

when I run an executable (regardless LabVIEW or any other programming language was used to create it) I expect it to run when opened.

Do you expect something different when you start MSWord, FireFox or any other program you need?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
JÞB
Knight of NI

Re: Compiled vi always runs when opened, Labview 2013 bug?


@LarsM wrote:

I'm presuming it's not a bug, but right now it looks like that:

 

I compile a vi to an exe using the application builder, but no matter how I adjust the settings, the vi will always run when opened.

 

I'm running LabVIEW 2013.

 


That would be what happens to any "Start-up.vi" when an application starts up


"Should be" isn't "Is" -Jay
LarsM
Member

Re: Compiled vi always runs when opened, Labview 2013 bug?

I want to enter values and set up things before I actually run the vi.

 

Why am I able to uncheck "run when opened" if it actually doesn't do anything?

 

If you're not going to answer the question, please refrain from posting.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
JÞB
Knight of NI

Re: Compiled vi always runs when opened, Labview 2013 bug?

The start up vi will run.  This is expected behavior.

 

If you want the running vi to wait for user input before executing a process you need to code a proper arcetecture to do that.  Look into the Producer Consumer (Events) design pattern.  It is a good way to start an application like you describe.

 

Spoiler
See, asking a question (or at least explaining what behavior you want) gets more specific answers.

 


"Should be" isn't "Is" -Jay
LarsM
Member

Re: Compiled vi always runs when opened, Labview 2013 bug?

Are you saying that the "run when opened" checkbox is obsolete?

 

What's the purpose of having a run mode (as opposed to edit mode) if nobody's expected to use it?

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
jcarmody
Trusted Enthusiast

Re: Compiled vi always runs when opened, Labview 2013 bug?

"Run when opened" and "edit mode" apply to the VI file, not the exe.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

LarsM
Member

Re: Compiled vi always runs when opened, Labview 2013 bug?

In the app builder properties, under "Source File Settings" I can click "Customize VI Properties..." and there uncheck "Run When Opened". Does this actually do anything?

Lars Melander
Uppsala Database Laboratory, Uppsala University
GerdW
Knight of NI

Re: Compiled vi always runs when opened, Labview 2013 bug?

Hi Lars,

 

the point is: any executable is set to "run when opened", that's the expected behaviour on any OS. You cannot change that behaviour!

 

But you can (or "have to") program a good UI that allows the user to start a measurement when (s)he is ready to do so. In the simplest form you just wait in a polling loop for a "Start now" button, in more advanced schemes you will use an event structure and maybe a state machine. A producer/consumer scheme can be used to, but will probably use the event structure and the state machine too...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
LarsM
Member

Re: Compiled vi always runs when opened, Labview 2013 bug?

A problem is that even though it runs when opened, it only runs once, not continuously.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University