11-20-2013 08:21 AM
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.
11-20-2013 08:31 AM - edited 11-20-2013 08:32 AM
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?
11-20-2013 08:40 AM
@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
11-20-2013 08:43 AM
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.
11-20-2013 08:48 AM
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.
11-20-2013 09:17 AM
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?
11-20-2013 09:27 AM
11-20-2013 09:32 AM
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?
11-20-2013 09:35 AM - edited 11-20-2013 09:35 AM
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...
11-20-2013 09:36 AM
A problem is that even though it runs when opened, it only runs once, not continuously.