LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically disabling a front panel button

Solved!
Go to solution
I am new user and am using LB 8.5.  I have two buttons on my front panel that I want to disable and prevent the user from changing during certain situations, but I also need the output of the button to remain in the same status until the situation has been cleared - if the first button boolean output is one, and the second is zero, the user must not be able to change either one until the output of the external device has dropped to zero.  
I am not familiar enough with loops, so if necessary, please point me to the proper example/tutorial.
 
Thanks
 



metzler CLAD
0 Kudos
Message 1 of 11
(13,853 Views)
You can disable a button by writing to a property node called disabled.
1.  Find the terminal for the button in your block diagram.  Right click, select Create/Property Node/ and then disabled. Drop onto block diagram.
2.  If necessary, right click that and select "Change to Write".
3.   Wire in a constant depending on what you want to do.  0 is Enabled, 1 is Disabled, 2 is Disabled and Greyed out.
 
Message 2 of 11
(13,846 Views)

I cannot get the property node to work.  I keep getting an error that says I cannot connect boolean to an unsigned integer, and conversions don't seem to work. 

If I could figure out how, I would post part of my vi to give everyone an idea of what is going on.  Can you tell me how to post my vi?

 

Thanks




metzler CLAD
0 Kudos
Message 3 of 11
(13,796 Views)
Solution
Accepted by topic author metzler
You can post your VI by clicking on the browse button at the bottom of the reply window and select the VI you want to post.  If your VI is too big or complicated, make a small version of the VI of just the part that is giving you a problem.
 
By the error you describe, it sounds like you are wiring the boolean button to the disabled property node??????
 
Attached is a simple VI that shows what you are asking to do.

Message Edited by Ravens Fan on 10-01-2007 03:55 PM

Message 4 of 11
(13,793 Views)

thank you, that works well




metzler CLAD
0 Kudos
Message 5 of 11
(13,765 Views)

Hi

 

just wondering how did u create the borders around the label ? In my program, there is no border around the text when i click to set the label visible.

Btw, i am referring to the untitled 4.vi prog. thank u.

Message Edited by rdtttttttttttttt on 01-26-2009 08:22 AM
0 Kudos
Message 6 of 11
(13,434 Views)

Which version of LabVIEW are you using.  In LV 8.2 (which is the version for that VI), the labels came up with the boxes around them by default.  If you look under Tools, Options, New and Changed for LabVIEW 8.x,  there is an option called transparent label names.  If that is checked, then the box doesn't appear.  If it is unchecked, the box does appear.

Message Edited by Ravens Fan on 01-26-2009 09:38 AM
Message 7 of 11
(13,428 Views)
thanks a lot for ur prompt reply. 🙂
0 Kudos
Message 8 of 11
(13,403 Views)

Hello,

This question is similar to the one above. I have an application that has 10 tabs with roughly 10 buttons on each tab. What I am trying to do is disable buttons, tabs, or vi application when another test is being performed. Is there a way other than creating a property node and disabling for every button?

 

Thanks in advance!

0 Kudos
Message 9 of 11
(7,603 Views)

(I recommend starting a new thread instead of adding to an ancient discussion that is already marked as solved.)

 


@CLAD_in_training wrote:

 

This question is similar to the one above. I have an application that has 10 tabs with roughly 10 buttons on each tab. What I am trying to do is disable buttons, tabs, or vi application when another test is being performed. Is there a way other than creating a property node and disabling for every button?

 


I don't know what you mean by disabling a "VI application".

 

There are many solutions. For example

  • if you disable a certain tab, all controls on it will automatically be disabled.
  • Create an array of references for the controls that go together and use a FOR loop and a single property node to iterate over the references and disable/enable them.
  • Group related controls into (invisible if needed) cluster containers and disable the clusters according the the current needs.
  • ...
  • Don't do too much FP micromanagement and simply ignore certain button actions if the time is not right for them.
  • ...

 

 

0 Kudos
Message 10 of 11
(7,595 Views)