LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switch until release is staying switched

Solved!
Go to solution

I have a switch until released boolean for my quit button (i.e. go back to false after pressed). However, sometimes it is staying switched. This causes a problem because when I try to run again the quit button starts pressed down. I'm warry about posting the code for company reasons so I'll have to check if I can do that. However, has anyone run into this before? I have noticed if I hold it down for longer, it will switch back, but if I click it more quickly it stays stuck in the true position. I have no references to the control to reset it, and no locals.

 

0 Kudos
Message 1 of 4
(3,044 Views)
Solution
Accepted by GregFreeman
The default mechanical action for a stop button is Latch When Released. Use that.
Message 2 of 4
(3,042 Views)

for(imstuck) wrote:

I have a switch until released boolean for my quit button (i.e. go back to false after pressed). However, sometimes it is staying switched. This causes a problem because when I try to run again the quit button starts pressed down.

 


I adjust the "Quit" button to "False" before the rest of the program is launched. That is really not much code to add.

 

My "Quit" button works ok, but I simply have done this, because a user might press the button before he/she starts the app (you have to process all kinds of irrationalities, even if they seem unlikely).

Message Edited by Giedrius.S on 02-18-2010 06:46 PM
---

While evaluating my code please have in mind that I am a LV novice. Therefore sometimes my code might violate some coding rules that I have to learn about myself. But how else could I do that... 🙂

Chart zoom with "Mouse Over" effect
Message 3 of 4
(3,040 Views)
Ah, the simple things in life.

Dennis Knutson wrote:
The default mechanical action for a stop button is Latch When Released. Use that.

In response to Giedrius.S
, the app closes when they quit, and runs when open, so there is no chance they will click the button when it is not running.

Message Edited by for(imstuck) on 02-18-2010 10:52 AM
0 Kudos
Message 4 of 4
(3,033 Views)