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: 

Programmatically click a button

Solved!
Go to solution

I have a button with a latch action, and I want to control the click of the button programmatically, so that when the case is true, the button is clicked and it then returns to its default value.

Can someone please tell me how to do this?

Thanks in advance!

0 Kudos
Message 1 of 3
(5,756 Views)

You cannot write the value property of a latching boolean.  use a switching mechanical action write the value property twice ( Set/Reset) or write value (Signaling) followed by a write to the Value property  to generate the one event.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(5,746 Views)
Solution
Accepted by topic author Nando88

I just fixed my problem.

I used a flat sequence, and in it a 2 local variables of a button, in the first frame of the flat sequence, I wired a true to the button and in the next frame a false to the button. I also wired a local variable of this same button to the stop of the while loop, and now everytime the condition is met the loop stops and starts again.

I forgot to mention that I had to remove the mechanical action of the button in order for me to control it programmatically.

0 Kudos
Message 3 of 3
(5,740 Views)