From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Button Sticking

Hello,
I am creating a 3 column buttoned GUI (note: the buttons that are displayed in the 2nd & 3rd column depend on which button in the first is seleted).

Anyhow, periodically [ 1 out of every 5 times], when a button is pressed (which are in the 1st latch mode), they stick. What I mean by this, is the button is selected (pressed down) and stays that way for about 3-5 seconds, and then becomes deselected.

Any idea why this is happening, or how I can avoid it?

thanks!
Phil
0 Kudos
Message 1 of 3
(2,462 Views)
When using the latch operation the button will only return to its default state after it has been read on the block diagram. Maybe you could post and example. It sounds like you execution is not getting to the button. Maybe try using an event structure. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 3
(2,459 Views)
Yes to unlatch a button it must be read. If a lot of junk is happening inside of a single loop (only one thread) you might not get to the point where the latch is read back for a few seconds. Event structures can make your GUI much more responsive , place the button inside value change event of an event structure and hook the button to a case structure. Inside of the true case you can put the code to execute when the button is pressed, it will unlatch when read out by the case structure and should respond rather fast. Keep in mind that if the button causes some processor intensive code, it might be best to place it in its own thread (parallel loop) and synchronize it with an occurance or other shared synchronization resource.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 3
(2,452 Views)