LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop the executable from starting when opened

Hi Guys,

I am building an exe with the application builder. I am not able to find a way to stop the exe from running when opened. I dont need the exe to run. I know I m missing a very basic step here but I m not able to do that.
Could anyone explain me how to do this.

Regards,

Nitin
0 Kudos
Message 1 of 10
(3,928 Views)
Once it's built I'm not sure there is a way to open an executable and not have it run - why do you want it to?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 10
(3,927 Views)
Hi Mike,

I am making this executable for one of the engineers to go on a field trip. It will acquire the data with a DAQ card, but the engineer can use any card which is available to him, he has some options either to use PXI or PCI so when the executable loads up, it starts to run and gives an error. The engineer is not good at Labview and he asked me if there is way that the executable wont run when started.
Thats the reason I m looking for a way to do that.
Is there any way to do that.

Regards,

Nitin
0 Kudos
Message 3 of 10
(3,922 Views)
You need to set up the program so that when it starts it asks for a configuration: PCI or PXI. Then it changes any parameters which must be changed depending upon the device selected. Then it sits in an idle state until the user presses a "Start Test" button on the screen.

Lynn
Message 4 of 10
(3,913 Views)
Hi Lynn,

Thanks, for the information. I will do that. I had previously done that sort of thing, but I was looking if there was a way to do that directly.

Regards,
Nitin
0 Kudos
Message 5 of 10
(3,910 Views)
Ok, I see the problem and there are several different approaches:

1) I believe that you can still create an executable in V8.x that doesn't run when opened. Make sure the top-level VI is not set to run when opened.
2) Modify the application so it doesn't start trying to acquire data until the user presses a button on the front panel that's labeled something like "Start Acquisition".
3) Provide some mechanism for allowing the user to select the DAQ hardware from the front panel. Acquisition would start after a selection was made.
4) Write the code such that it can auto-detect what DAQ hardware is available.
5) Make all your DAQ operations through virtual channels defined in MAX. That way the code doesn't really care what exact hardware is in use.

And there are probably others... How long before your engineer leaves on their field trip?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 6 of 10
(3,907 Views)



1) I believe that you can still create an executable in V8.x that doesn't run when opened. Make sure the top-level VI is not set to run when opened.



One of the 8.x versions has a bug (I believe it was 8.0) that a top-level VI was always running. The work around was to let the executable wait on a debug development environment (this will increase the size of the executable).

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 10
(3,877 Views)

Ton,

You re absolutely right, 8.0 was trhe buggy version. When an NI applicatin engineer came to our office for that demo, we saw that it was overriding the VI settings in the build settings, some vague things I could remember, but not concrete...

It was almost a year back.

- Partha ( CLD until Oct 2027 🙂 )
Message 8 of 10
(3,809 Views)

Nitin,

But, I doubt that you cannot build an exe that wont 'Run' when it is launched, like what Mike had replied in his post.

- Partha ( CLD until Oct 2027 🙂 )
Message 9 of 10
(3,805 Views)
 

Hello,

This is Dominic L. from Applications Engineering at National Instruments. This was reported to R&D (CAR#41DAPUQU) and was fixed in LabVIEW 8.2.1. Here is a link to the current evaluation software download for LabVIEW:

https://www.ni.com/en/support/downloads/software-products/download.labview.html

This particular bug actually renders all the build options for source file settings unusable. While the other options can be set manually in the source VI properties, the start-up VI will always run when an executable is opened.

Here are three different workarounds to this:

  • Option 1 - Upgrade to 8.2.1. 

     

  • Option 2 - Check "Enable debugging" and "Wait for debugger on launch" in the Advanced page of the build specification. One side effect is this will include the block diagrams of the VIs and extra code for debug tool support. Note that if you don't protect the source code (block diagram), it kind of defeats the purpose of creating an executable.

     

  • Option 3 - Use a dummy startup VI to launch the desired startup VI.

     

For the third workaround, the attached "Dummy Startup VI.vi" uses VI server to open the desired startup VI's front panel and then closes.  To use the Dummy Startup VI follow these steps:

 

 

  1. Add the Dummy Startup VI to the project.

     

  2. Open the Dummy Startup VI and change "Main VI.vi" to the VI you would like to open but not run in the project and save.

     

  3. In the source files page of the build, select the Dummy Startup VI as a startup VI and the VI you would like to open but not run as a support VI.

     

  4. Build and run.

     

 

I hope this helps.

Have a great evening!

Best Regards,

Dominic L.
0 Kudos
Message 10 of 10
(3,764 Views)