LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock a Button without property Node

Hello,

 

I am using LV 2013 and I would like to find a way I can lock out the use of a button without the use of the property node.

 

Basically I will have two buttons.  One which when activity will prevent the use of the other. 

 

 

Tim
0 Kudos
Message 1 of 8
(2,964 Views)

Magna?  Powertrain?

 

Anyway what is wrong with using a Property Node?  That's it's purpose is to modify the properties of an object like its disable state.

 

One alternative that may work depending on your situation, is a radio button.  This is a control that restricts the selection to one item at a time.  Without more information it is hard to say if this is an appropriate control for your application or not.

0 Kudos
Message 2 of 8
(2,960 Views)

Just use the output of the logical AND of the two buttons.

0 Kudos
Message 3 of 8
(2,948 Views)

@smoothdurban wrote:

Hello,

 

I am using LV 2013 and I would like to find a way I can lock out the use of a button without the use of the property node.

 

Basically I will have two buttons.  One which when activity will prevent the use of the other. 

 

 


That is an odd request.  Usually when a user asks for something that specific, what they are really saying is "I have a problem that the only way I know of is to do this strange thing."

 

Maybe you could describe your problem and why you think you need to do this unorthodox thing?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 8
(2,939 Views)

You also need to explain what you mean by "lock out". There is no reason not to use a property node. You only need to write the new property when the other button changes, which is probably not very often anyway. (Don't hammer the property node with the same value over and over!)

  • You can make it disabled and greyed out (property)
  • You can make it invisible (property)
  • You can conditionally ignore the button action in code (see above)
  • You can place it on a tiny tab indicator (tabs hidden) and write to the tab indicator to either show or hide the button.
  • Etc. Etc.
Message 5 of 8
(2,923 Views)

Perhaps and example of the desired control function will better describe on what I am trying to accomplish

 

I have  a button which depending on its actuation dictates which direction a motor is to rotate.  When engaged the output of the actuation will be true which will in turn completes the output of the .VI

The other button would be similar to a run button when enabled it allows the motor to begin to rotate.

 

Simple enough?

 

Now when the "run" button is enabled I want to block any further changes of state to the "direction" button, the idea would be the motor would be spinning and I don't want to have the ability to change the rotational direction when spinning.

 

In essence the effects of a change of state  from the direction button will only be allowed when the run button is not enabled.

 

Using an "AND" gate would not work because it would negate the function of the "direction" button unless the "run" button was enabled.

 

I cannot use a  property node as I am building model and the functionality is not inherited by the model.

 

Thanks

Tim
0 Kudos
Message 6 of 8
(2,901 Views)

It sounds like this can indeed be accomplished with some conditional code.  Attached is a snippet that I think does what you want.  Basically the direction only will change if the motor was off, and then became on.

0 Kudos
Message 7 of 8
(2,892 Views)

Feedback nodes have an Enable terminal, in this case you want to disable it when the motor enable boolean is true.  Previously posted VI reduces to this:

 

DirectionExample.png

0 Kudos
Message 8 of 8
(2,876 Views)