LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an application error

Hello All,

 

I am having a problem with building an application. In my program, I am using a Stop button to stop running the program which is working fine but when I build an exe file, after running the code by click on the Stop button the program will be closed. I built the application from the same code before and I did not have such an error. Would you please help me with this issue?

 

Thanks

0 Kudos
Message 1 of 5
(1,632 Views)

It's not clear if the problem is that the application is closing or if it isn't closing.

 

If you don't explicitly close your panel or exit, the front panel will stay open (just like in the development environment).

 

You can add something like this:

Close front panel in exe.png 

 

This will close the front panel, but only in the executable.

 

You can put an exit in there too, but this will abort everything, including loops i\that run in parallel. If this is required, things could be improved... Aborting loops isn't a good thing. Although it can be harmless, a more determined close routine is preferred.

0 Kudos
Message 2 of 5
(1,617 Views)

Thanks for your reply.

I should explain it better.

I have four while loops in my program something like the attached one,  which each one communicates with the same four spectrum analyzers. the program works fine but when I make an exe file and run it by click on the Stop button the whole program will close instead of stop running that. 

0 Kudos
Message 3 of 5
(1,574 Views)

Thanks for your reply. 

I should explain it better.

I have four while loops in my program something like the attached one,  which each one communicates with the same four spectrum analyzers. the program works fine but when I make an exe file and run it by click on the Stop button the whole program will close instead of stop running that. 

0 Kudos
Message 4 of 5
(1,562 Views)

A stopped program (edit mode) has no meaning for a built application. You should design your program as a proper state machine if you want an idle state Where it goes whenever the program starts or needs to wait for a new run.

 

(There are also better ways to communicate the stop state than with value properties)

 

We can offer significantly better help if you would attach your project and dependencies. We cannot tell your build specifications and VI properties from a picture of the diagram.

0 Kudos
Message 5 of 5
(1,570 Views)