NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
MikeMike
Posts: 48
0 Kudos

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
Trusted Enthusiast
parthabe
Posts: 2,481

Re: How to enable and disable button?

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.


LabVIEW - Wires that catch bugs!
Trusted Enthusiast
Albert.Geven
Posts: 3,332
0 Kudos

Re: How to enable and disable button?

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
Member
MikeMike
Posts: 48
0 Kudos

Re: How to enable and disable button?

Thanks Partha !!!! This is what i exactly want.
Trusted Enthusiast
parthabe
Posts: 2,481

Re: How to enable and disable button?

Say it with stars ! :smileywink:

LabVIEW - Wires that catch bugs!
Trusted Enthusiast
parthabe
Posts: 2,481

Re: How to enable and disable button?

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 ?


LabVIEW - Wires that catch bugs!