LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How build buttons that can be excuted once when mouse down, but recover to its original status when mouse up

Basically, I want to build several independent buttions. When one button gets the mouse down event, some code is excuted once, but when mouse up, the button go to its original status, and wait for the next click.,

this should be pretty simple in other languages (C++, or Java), anyway, I feel so hard to figure it out in Labview.

Any help will be greatly apprecitated!

best
0 Kudos
Message 1 of 7
(3,460 Views)
Right click on the button and select Mechanical Action>Latch When Released and make sure you place the terminal for the button inside the event. A value change event is all that you need for this.
0 Kudos
Message 2 of 7
(3,455 Views)
thanks Dennis
I find the part:"Mechanical Action>Latch When Released", but I have no idea what's "make sure you place the terminal for the button inside the event"
I am totally a
rookies, can you make it clearer? If possible, it will be great if there is a sample.
thanks again

0 Kudos
Message 3 of 7
(3,452 Views)


@zhiheng wrote:
but I have no idea what's "make sure you place the terminal for the button inside the event"

A latch action means, a button will stay in its position [action] until it is read by the code.

This means to connect the button to a true case or simply place the button inside the Value Change event of the Event Structure [ES].

Put the Execution Highlighting mode & run the code, you ll see what we mean.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 7
(3,444 Views)
See this post for some good guides to start with

Paul
0 Kudos
Message 5 of 7
(3,442 Views)
Smiley Very Happy
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 6 of 7
(3,432 Views)
thanks your guys
I got it
0 Kudos
Message 7 of 7
(3,416 Views)