LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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
0 Kudos
Message 1 of 23
(3,467 Views)

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
Message 2 of 23
(3,460 Views)

@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
0 Kudos
Message 3 of 23
(3,453 Views)

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
0 Kudos
Message 4 of 23
(3,442 Views)

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
0 Kudos
Message 5 of 23
(3,433 Views)

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
0 Kudos
Message 6 of 23
(3,412 Views)

"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

0 Kudos
Message 7 of 23
(3,406 Views)

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
0 Kudos
Message 8 of 23
(3,402 Views)

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
0 Kudos
Message 9 of 23
(3,399 Views)

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

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 10 of 23
(3,397 Views)