取消
显示结果 
搜索替代 
您的意思是: 

button help!

Hello there, lets say I have a button called "Run". How can I make it so that when I push down the button, it pushes back up, instead of staying pushed down. Also, I was looking at some VIs, there was this "Exit" button that had more than one appearance in the block diagram. How do you do that? Thanks a lot!

0 项奖励
1 条消息(共 8 条)
3,445 次查看

Right-click..mechanical action. Select "Latch when released". It will pop back out as soon as it is read by the code, so make sure it is in the dataflow or relevent event frame.

 

If you rather want the functionality of a car horn, use "switch until released", but this does not guarantee that the code sees it if the press time is short. 

 

You can color and modify the true and false state seperately, even have different boolean text. Start with right-click..properties". You can also import pictures into the true and false states using the control editor (right-click...advanced...customize")

2 条消息(共 8 条)
3,443 次查看

A button that pops back up after it is read has a "latching" action.  It is a property you can set if you right click on the button.

 

I don't know what you mean about an "Exit" button that had more than one appearance.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 项奖励
3 条消息(共 8 条)
3,442 次查看

Apart from what is stated above, you can try this-  sometimes if you are using local variables associated with the button, it doesn't allow you to have it as "Latch Action", and assuming that you are using this button inside a loop, you can assign a local variable to the button just outside the loop and set it back as depicted below-

Capture.PNG

Best of luck:)

Sanju

0 项奖励
4 条消息(共 8 条)
3,421 次查看

Hi j49sun,

 

Regarding the different looks of the exit button on the block digaram, I suppose you are seeing the expanded and reduced icons of the same control. You can do this by right clicking the control on your block diagram and ticking/unticking  the "View as icon" option.


Regards,


Nitzz

(Kudos are always Welcome;)) 

0 项奖励
5 条消息(共 8 条)
3,408 次查看

Thanks a lot altenbatch..even though i have read quite a few basic tutorials, until you pointed it out in this post i never thought of the implications the mechanical action would have on the code...now i REALLY get the difference in action. 

---------------------- * -------------------------------------------
He who asks a question is a fool for a minute.
he who does not, remains a fool forever.
---------------------- * -------------------------------------------
0 项奖励
6 条消息(共 8 条)
3,399 次查看

I had the same problem earlier, thanks for the solution guys. just luckily found this post when trying to make a new thread

0 项奖励
7 条消息(共 8 条)
3,390 次查看

wow that was really helpful! Thank you so much guys.

0 项奖励
8 条消息(共 8 条)
3,383 次查看