11-07-2009 06:13 PM
cant remember how to change a buttons state based on the value of another button.
I think it was an event structure?
can someone post an example?
thanks
Solved! Go to Solution.
11-07-2009 09:24 PM
so for example, assume we have two buttons, A and B
Lets assume that button A is either true or false, we dont know.
So now when button B changes to true, button A needs to be true
11-07-2009 09:43 PM
There are several parts to your question:
Responding to a button changing state: This can be done with either an event structure within a loop, or by polling the button in the loop. Examples ship with LabVIEW on using event structures.
Changing the value of another button: This can be done with either a local variable or with a "Value" property node. (Cue the local variable crowd at this point.). Note that the latching action of your button will affect whether you can do this. See this KB article for more information: Why is My Boolean Value Property Node a Variant?
11-08-2009 06:37 AM
smercurio_fc wrote:[...] (Cue the local variable crowd at this point.) [...]
It sounds like jimmyinct3 is using a local variable in the one case that doesn't give me hives. IMO, it is acceptable to use a local variable to set the value of a control when it depends upon other conditions in the system. For example, it is appropriate to turn the UUT Power switch off if triggering another action causes the ATE to remove that power. It would be awkward for the user to have to turn the power switch off in order to reapply power to the UUT.
11-08-2009 03:53 PM - edited 11-08-2009 03:54 PM
thanks, both of you.
I did expereiment with both.
the property note was tricky as it latched the button so the value couldnt be changed again from user input.
the local varaible was so easy, its embarassing.
solution and kudos split..