07-30-2021 08:20 AM
Hello , I'm programming a test machine to test a certain circuit board, so that workers in a particular plant will use it , the problem is most of the workers in the plant are old people and they are having hard time starting and stopping the program due to the small buttons in the toolbar ,
I already managed to have a big and visible start button to run the program using x control , but I'm struggling to do the same for the abort button , can anyone help ?
thank you,
Solved! Go to Solution.
07-30-2021 08:25 AM - edited 07-30-2021 08:28 AM
Why on earth would you use an XControl for that?
That could be a simple control, just like any other control. What value would an XControl add?
Please explain how (and why) you used an XControl to make a start button first...
07-30-2021 08:29 AM
i want to be able to run the program every time you press start button thats why i used xcontrol,
anyway my question is about the stop abort button not the start !!
07-30-2021 08:46 AM - edited 07-30-2021 08:51 AM
@aasaleh024 wrote:
i want to be able to run the program every time you press start button thats why i used xcontrol,
anyway my question is about the stop abort button not the start !!
Using an xcontrol to start a program is incorrect. Using an xcontrol to abort a Vi is also incorrect. Two wrongs don't make a right! Did you even read the thread where that xcontrol is discussed?
As has been discussed many times, your program needs to be a simple state machine that runs when opened and goes into an idle state until changed by whatever button on the front panel is operated (run certain task, go back to idle, close, etc.).
If your users are easily confused, having the VI in edit mode at any stage of the program is confusing and wrong!
07-30-2021 08:46 AM
@aasaleh024 wrote:
i want to be able to run the program every time you press start button thats why i used xcontrol,
anyway my question is about the stop abort button not the start !!
You should have an event structure.
The event structure should be in a while loop.
Put a button on the Front Panel.
Add a Value Change Event.
In the Stop Value Change event, the stop of the while loop becomes true.
I just don't see at all how an XControl would help. In fact, I don't see how it will significantly complicate things.