LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO AVOID STOP A EXE PROGRAM?

Solved!
Go to solution

HELLO TO EVERY ONE, I WOULD LIKE TO KNOW IF ITS POSSIBLE TO AVOID THAT A USER OF AN EXE PROGRAM STOP THE PROGRAM.
I HAVE PERFORMED A PROGRAM THAT COUNT THE TIME THAT A PHASE OF PROCESS TAKES AND I DONT WANT THAT THE USER STOPS THE PROGRAM TO ALTER THE TIME RESULT.
HOW COULD I DO IT?
BY ADVANCE THANKS.

0 Kudos
Message 1 of 10
(2,828 Views)

Your caps lock key seems to be stuck.  That makes your message that much harder to read.

 

What method are they using to stop the program now?  I assume at some point of time you will want the program to stop either on its own or through a request of the user, so how do you want to enable that?

 

It is impossible to offer suggestions to a program that you failed to attach as a VI to your message.

0 Kudos
Message 2 of 10
(2,791 Views)

You can disallow to close the window (customize windows appearance in vi properties) or you can use a filtering event for "panel close?". What kind of problem are you trying to solve?

Message 3 of 10
(2,786 Views)

Danybond_0-1574695388279.png

Hi altenbach, i did not upload the VI (PREGUNTA.SWITHC) because i considered it was no necesary, but i have uploaded if it could help you to help me.

As you can see on the image the run and stop buttons on the executable program are available, i thought those buttons were not going to be available once created the exe program, and testing my program i realzed that the user could stop the program and thus alter the time result on time indicators.

My program is still building, it needs more things, but i need that the program being stoped by a button with pasword(on VI), not by the stop button indicated with red arrows on the image.

Im working on button with pasword, i dont consider it tough, but i would like to know if its possible to block the stop button indicated with red arrows on the image or make it inactive, to stop the program using the pasword button.

Thank you in advance.

 

0 Kudos
Message 4 of 10
(2,719 Views)

Danybond_0-1574696838821.png

Hi RavensFan, i did not upload the VI because i considered it was no necesary, but i have uploaded if it could help you to help me.

As you can see on the image the run and stop buttons on the executable program are available, i thought those buttons were not going to be available once created the exe program, and testing my program i realzed that the user could stop the program and thus alter the time result on time indicators.

My program is still building, it needs more things, but i need that the program being stoped by a button with pasword(on VI), not by the stop button indicated with red arrows on the image.

Im working on button with pasword, i dont consider it tough, but i would like to know if its possible to block the stop button indicated with red arrows on the image or make it inactive, to stop the program using the pasword button.

Thank you in advance.

0 Kudos
Message 5 of 10
(2,717 Views)
Solution
Accepted by topic author Danybond

Okay.  You only need to attach your message once.  No need to make two messages with the same reply.

 

Did you go into VI Properties >> Window Appearance?  You can change the settings to be be a Top-Level application window.  Or use Customize to more specifically enable to disable windows elements such as showing the abort and run buttons.

0 Kudos
Message 6 of 10
(2,707 Views)

@RavensFan wrote:

Okay.  You only need to attach your message once.  No need to make two messages with the same reply.

 

Did you go into VI Properties >> Window Appearance?  You can change the settings to be be a Top-Level application window.  Or use Customize to more specifically enable to disable windows elements such as showing the abort and run buttons.


Or a hybrid of the two suggestions, which is to first set it as top level, then customize it to your liking.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 10
(2,694 Views)

Thanks a lot.

Very good contribution

👍

0 Kudos
Message 8 of 10
(2,690 Views)

OK, you attached a VI (not an executable or explain how you are building the executable).

 

Are you running this in the developments system or are you actually bulding a standalone exe?

 

Thanks for attaching the code. It is highly flawed. Who wrote it?

Here are some issues from a 10 second glance at it:

 

  • Extreme overuse of local variables.
  • Race condition due to that. You are reading locals in parallel of writing to the terminal and there is no telling who wins the race. Since the terminal is written in the event, all other parallel instances are most likely read first.
  • Empty Timeout events that have a timeout of -1.
  • Event structures that will potentially lock the front panel forever.
  • Rube Goldberg code such as a "select" with TRUE wired to both selections. The output wired to the stop condition of a completely unnecessary inner while loop (that loop will always end after one iteration and can be deleted without change in functionality.
  • Extreme code duplication. All could be combined into a nice state machine with one toplevel loop, no local variables, no event structures, and no sequence structures and  arrays as controls and indicators.
  • A series of dysfunctional IPE frames used as poor man's sequence structure.
  • etc. etc.

Can you write down in simple terms what the code is supposed to do and how it should be used? I am sure it could be done in 5 minutes and <10% of the current code with a diagram the size of a postcard. Try it!

0 Kudos
Message 9 of 10
(2,684 Views)

Hi altenbach.

I have writted this program, and yes, i have uploaded a VI to you can see the code, and the picture is a capture of the exe program.

I have a lot of errors as you say because i dont have training on this sofware, ive been learning by myself trying to do my best, but this way to learn is not so efficent.

Im going to tell you what i want this program do.

I want to perform a process phase tracking and count the time that every phase takes, i have done some anti failure mechanisms, as you can see, buttons blocked if you dont start with the first button and anti return of the button once pushed and what i have asked first that i already know how to do it.

Every boolean swith represents a phase of a process, when the operator goes to the next pashe he must push the next switch.

I want to have the register of the state of the proces (which phase is working) and time that takes every pahse.

This is not a automated process, thats the reason im not using sensors, is a manual procedure.

These are my first objetives.

After, i want to do this program by tcp/ip to collect this information in a client (server is this process track phase and client is a supervisory program) and add some side windows (i dont know the right term on english) like the picture to add more functions.

i apreciate your interest and help.

 

Danybond_0-1574705899477.png

 

 

0 Kudos
Message 10 of 10
(2,667 Views)