LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reinitialize button after pressing

I want to have a button that when pressed will the vi will perform some operations, but the button will not stay pressed.  So when you press it, it reinitializes to the unpressed state.

I'm using 7.0
0 Kudos
Message 1 of 7
(3,307 Views)
Right click your button, and go to Properties. Click on the Operations tab, and select "Switch when pressed". You can even preview the action of the button.

By doing this, the button will always be "pressed" (returning a true value), and will not reinitialize to the unpressed state.  

Message Edited by Anthony_Wong on 06-15-2006 11:25 AM

Anthony Wong
University of Toronto
Chemistry Department
0 Kudos
Message 2 of 7
(3,300 Views)
I think you are looking for mechanical action "latch when released" or "latch when pressed". Right-click on the button and set it accrdingly.
 
In these modes (latch action), the button stays true until the button is actually read by the code, at which time it returns to the off state automatically.
0 Kudos
Message 3 of 7
(3,289 Views)


@gatordan82 wrote:
I want to have a button that when pressed will the vi will perform some operations, but the button will not stay pressed.  So when you press it, it reinitializes to the unpressed state.

OK, your question is unclear.

Do you want a button that (1) does all the above (See my answer), or do you want a button that (2) does everything up to the first comma and the behavior described after the first comma is undesired (See anthony's answer).

Please clarify!

0 Kudos
Message 4 of 7
(3,286 Views)
I'll figure this out in a minute, but...is there any way you can delete a post you make?

Message Edited by gatordan82 on 06-15-2006 12:07 PM

Message Edited by gatordan82 on 06-15-2006 12:08 PM

0 Kudos
Message 5 of 7
(3,285 Views)
ok thanks all for the input...altenbach you had what I was looking for (Latch when pressed).  I'm a labview noob obviously, and I'm learning that there's a lot I can do by just right clicking on stuff.
0 Kudos
Message 6 of 7
(3,274 Views)
just one caveat about the latch when pressed it will retain this state until the vi reads the buttons value and has caused me some confusion in debugging in the past. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 7
(3,261 Views)