07-07-2011 02:25 PM
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!
07-07-2011 02:32 PM
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")
07-07-2011 02:32 PM
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
07-07-2011 07:05 PM
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-
Best of luck:)
Sanju
07-08-2011 01:36 AM
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;))
07-08-2011 02:06 AM
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.
07-08-2011 06:20 AM
I had the same problem earlier, thanks for the solution guys. just luckily found this post when trying to make a new thread
07-08-2011 08:45 AM
wow that was really helpful! Thank you so much guys.