LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reset switch automatically

Solved!
Go to solution

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.

 

0 Kudos
Message 1 of 8
(5,987 Views)

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?

0 Kudos
Message 2 of 8
(5,986 Views)

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 .

 

0 Kudos
Message 3 of 8
(5,981 Views)
Solution
Accepted by duaa

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.

Ravi A.
National Instruments | Applications Engineer
Message 4 of 8
(5,955 Views)

@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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 8
(5,949 Views)

((

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.

Ravi Antani))
i did this , i add a propery node and value type ,then write false to the switch when some condition is true and this is in case structure . but the problem after that the switch is disabled and i cant control it again in the front panel ? ! 
i want something to reset the switch and after that the user can control it and it is not disabled .
here is a screen shot fro my program
 
0 Kudos
Message 6 of 8
(5,935 Views)

ok the problem is solved Smiley Happy

it was a programming problem since i was using formula node 

thank you all 🙂 

0 Kudos
Message 7 of 8
(5,932 Views)

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.

0 Kudos
Message 8 of 8
(5,925 Views)