LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable and disable button?

Hi,
  I am new to LabView. So please forgive me for putting so simple question on this forum. I have one RUN button,one STOP button in my Vi. When Vi is running if I press RUN button some action initialise and RUN button goes in disable mode. When I press STOP button my vi stops and STOP button goes in disable mode. When I again execute my vi this 2 button (i.e RUN and STOP) are still in disable mode. What I require is that irrespective of state of button in first execution,the state of button must be always in enable mode whenever I execute the VI.
  Second problem is that when i press RUN button it goes in disable mode,if user again press the RUN button(now in disable mode) it should not enabled unless and until user press STOP button or vi is executed once again.
 
Thanks & Regards:-
Mike
0 Kudos
Message 1 of 6
(26,904 Views)

Hi Mike,

For your first question, answer is simple. You ve to programatically reset the buttons back to Enabled mode.

For your second question, the user cannot click on a Disabled or Disabled & Grayed out button and initiate a correspomding, unless & until that button is programmed with its Mouse Down/Up event using the Event Structure method of programming.\

See the attached VIs in LV 7.1.

Repost here for more doubts or queries.

- Partha ( CLD until Oct 2024 🙂 )
Download All
Message 2 of 6
(26,898 Views)
Hi

The real question is : what do you mean with disable mode?
Normally when you push a button the boolean value switches and if this button has the latch action enabled (mechanical action) it stays in that value until the program reads it.

disabling buttons is something you do in the program and only if you really want to do it.

greetings from the Netherlands
0 Kudos
Message 3 of 6
(26,897 Views)
Thanks Partha !!!! This is what i exactly want.
0 Kudos
Message 4 of 6
(26,893 Views)
Say it with stars ! Smiley Wink
- Partha ( CLD until Oct 2024 🙂 )
Message 5 of 6
(26,888 Views)

See the attached VI for a bit of modification of the booleans being put to Latch mechanical action.

Thisis what Albert Geven had mentioned in his post.

Do you need something similar to this ?

- Partha ( CLD until Oct 2024 🙂 )
Message 6 of 6
(26,886 Views)