09-09-2021 05:14 AM
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
09-09-2021 06:29 AM
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:
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.
09-10-2021 02:19 AM
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.
09-10-2021 04:08 AM
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.
09-10-2021 08:37 AM - edited 09-10-2021 08:56 AM
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.