10-16-2014 11:52 AM
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.
10-16-2014 12:03 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-16-2014 12:18 PM
Just use the output of the logical AND of the two buttons.
10-16-2014 12:23 PM
@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?
10-16-2014 12:39 PM - edited 10-16-2014 12:56 PM
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!)
10-16-2014 01:21 PM
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
10-16-2014 01:35 PM - edited 10-16-2014 01:36 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-16-2014 02:01 PM
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: