取消
显示结果 
搜索替代 
您的意思是: 

programmatically disabling a front panel button

已解决!
转到解答
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 项奖励
1 条消息(共 11 条)
17,729 次查看
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.
 
2 条消息(共 11 条)
17,722 次查看

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 项奖励
3 条消息(共 11 条)
17,672 次查看
解答
接受人 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

4 条消息(共 11 条)
17,669 次查看

thank you, that works well




metzler CLAD
0 项奖励
5 条消息(共 11 条)
17,641 次查看

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 项奖励
6 条消息(共 11 条)
17,310 次查看

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
7 条消息(共 11 条)
17,304 次查看
thanks a lot for ur prompt reply. 🙂
0 项奖励
8 条消息(共 11 条)
17,279 次查看

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 项奖励
9 条消息(共 11 条)
11,479 次查看

(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 项奖励
10 条消息(共 11 条)
11,471 次查看