취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

reset switch automatically

해결 완료!
솔루션으로 이동

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 포인트
1/8 메시지
6,815 조회수

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 포인트
2/8 메시지
6,814 조회수

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 포인트
3/8 메시지
6,809 조회수
솔루션
주제 작성자 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
4/8 메시지
6,783 조회수

@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 포인트
5/8 메시지
6,777 조회수

((

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 포인트
6/8 메시지
6,763 조회수

ok the problem is solved 기쁨 이모티콘

it was a programming problem since i was using formula node 

thank you all 🙂 

0 포인트
7/8 메시지
6,760 조회수

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 포인트
8/8 메시지
6,753 조회수