LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buttons behavior with event structure

Hi, i've found that buttons (Ok, Cancel from Boolean controls) exibit
a strange behavior with event handler structure.
Normally when you press the button it changes to "pressed" state (i.e.
darker background), and when you release it changes again to "non
pressed" state. When you add an evenct structure (inside a while
loop), every button in front panel remains "pressed" even if you
already released mouse button. If you press it again, it change to non
pressed status.
The event structure continue to work as expected, the problem seems to
be in the user interface...
I've tried to uncheck "lock panel until handler completes" property,
but it didn't work.

What's wrong?

Best regards,
Eugenio Navacchia
University of Bologna
Italy.
0 Kudos
Message 1 of 6
(3,544 Views)
I hope I am right for this (about buttons)and not making a fool 🙂

If the Buttons that you are using are of "Latch When Release" for its Mechanical Action, it will remain "pressed" if it does not connecting to any CASE. However, if you do have it connected to a CASE (for some action when it is pressed), it will be reset to "non-pressed" state.

Does this make sense?
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 6
(3,544 Views)
example
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 3 of 6
(3,544 Views)
> If the Buttons that you are using are of "Latch When Release" for its
> Mechanical Action, it will remain "pressed" if it does not connecting
> to any CASE. However, if you do have it connected to a CASE (for some
> action when it is pressed), it will be reset to "non-pressed" state.
>

Yes, you are correct. To reset a latched Boolean, you need to read the
terminal. If you are using a reference to read it, you might want to
hook up error I/O, because it will be returning an error.

Greg McKaskle
0 Kudos
Message 4 of 6
(3,544 Views)
"ian.f" wrote in message news:<506500000005000000D5F60000-1042324653000@exchange.ni.com>...
> I hope I am right for this (about buttons)and not making a fool 🙂
>
> If the Buttons that you are using are of "Latch When Release" for its
> Mechanical Action, it will remain "pressed" if it does not connecting
> to any CASE. However, if you do have it connected to a CASE (for some
> action when it is pressed), it will be reset to "non-pressed" state.
Yes!!! I've just changed mechanical action to "switch until released",
and controlled in the event structure via "mouse up" method. It works!

Thank you Ian!!!

Eugenio Navacchia
University of Bologna
Italy.
0 Kudos
Message 5 of 6
(3,544 Views)
You're most welcome and

to Greg, I appreciate your comment 🙂

Cheers!

labview@ianfung.net
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 6 of 6
(3,544 Views)