ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com is currently experiencing issues.
Support teams are actively working on the resolution.
04-06-2014 02:24 AM
hey all,
I have a problem on how to implement two dependent boolean buttons.
my instrument application has two buttons:
one is an on/off button which I implement as text i.e it shows on all the time for true values and off for false value. it is a switch button and every press change the state and remain in that condition till the next switch.
my second button is an emergency button - he works as latch button and every press shut down the insturemnt immediatly - it is equivalent to the off state of the first buttons.
both buttons work indepently - but I want them to work dependtly so that when the emergency button will also change the on \ off state on the front pannel. I elaborate, at the moment I have the following when pressed (Action - Result)
POWER ON SWITCH - text button shows power on and the the instrument is on.
Emergency is latch - Instrument is off but the POWER TEXT BUTTON STILL SHOW ON.
I want the later to both turn the instrument off and to change the button text on the front pannel.
is this possible?
04-06-2014 02:30 AM
@mrish wrote:is this possible?
Everything is possible and that sounds like a simple problem. Please attach the code you have so far.
04-06-2014 04:18 AM
my code is just operational - there is not attempt to solve it.
I thougt of the matter and what I really need is "initialize to default value" my program in response to some buttons value change.
I know there is some property node to do that but I couldn't find it, or know how to use it property.
Can someone help with that?
04-06-2014 06:22 AM
if you mean reinitialization of variables (controls indicators etc) then go in block diaggram click on the variable control / indicator and right click. i am attaching the path snapshot. hope this will help you
04-06-2014 11:21 AM - edited 04-06-2014 01:59 PM
You can just write a FALSE to the boolean control using a local variable of it. That's the easiest.
("Reninitialize to default" is not a property, but a method. You need to create an invoke node instead. Still that seems ill advised, because it assumes that the default value is false. Writing a defined value (FALSE) to a local variable is the correct way to do it.)
Here is a simplified code fragment:
@Tirmizi wrote:
if you mean reinitialization of variables (controls indicators etc) then go in block diaggram click on the variable control / indicator and right click. i am attaching the path snapshot. hope this will help you
I am pretty sure the OP was talking about programmatic changes, so this is not the solution.
04-06-2014 01:43 PM
thanks you all!
this is more easy than I thought it would be!