05-17-2012 01:30 AM
hi
i have switch button in my front panel and its type is switch when pressed.
i want to reset this switch to False if some condition is true like if the output of an and gate is true .
after that the user can control it normally.
Solved! Go to Solution.
05-17-2012 01:47 AM - edited 05-17-2012 01:51 AM
Do you want to reset it straight away, or some time later?
edit: What I mean is, will the "other condition" happen at any time, or will it only be before you switch it?
05-17-2012 01:51 AM
i want to reset straight away
i have this button in a loop
so if the action is true it will reset the button
and in the next iteration the user can control the button to switch it on or off .
05-18-2012 09:07 AM
You can use something called a Property Node to set the value of a Control or Indicator somewhere else in a program.
To create a property node for your button, right-click the terminal for the button in the block diagram and choose Create >> Property Node >> Value. Then, you'll have your property node and can place it anywhere on the block diagram. It probably defaults to "Read", but just right-click the property node and choose "Change to Write," and now you will be able to write a value to it. Use a case structure to decide whether or not to write the value based on some other condition.
05-18-2012 04:29 PM
@duaa wrote:
i want to reset straight away
i have this button in a loop
so if the action is true it will reset the button
and in the next iteration the user can control the button to switch it on or off .
If you don't want the user to have access to the button until it is reset, you can also use the "disabled" property node to control access to the button during certain conditions.
05-19-2012 04:36 AM
((
You can use something called a Property Node to set the value of a Control or Indicator somewhere else in a program.
To create a property node for your button, right-click the terminal for the button in the block diagram and choose Create >> Property Node >> Value. Then, you'll have your property node and can place it anywhere on the block diagram. It probably defaults to "Read", but just right-click the property node and choose "Change to Write," and now you will be able to write a value to it. Use a case structure to decide whether or not to write the value based on some other condition.
05-19-2012 06:00 AM
ok the problem is solved ![]()
it was a programming problem since i was using formula node
thank you all 🙂
05-19-2012 11:06 AM
Your conclusion makes no sense.
First, the Value property node has nothing to do with whether a control is disabled or not. The Disabled property node handles that.
I don't know what programming problem in your property node would cause that.
I don't think you should be using a property node at all. The code in there looks like you should be able to implement it using a handful of basic LabVIEW functions.