Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Individual Button Presses (http://www.chiefdelphi.com/forums/showthread.php?t=92369)

captainking 19-02-2011 19:38

Individual Button Presses
 
Hey, we are running a claw on the robot and want to make it so that pressing a button opens it, and then pressing it again closes it.

We have 2 limit switches to determine whether the claw is open or closed.

Our problem is that when we hold the button down, due to it being in a loop, it constantly switches between the "closing" state and the "opening state".

How can we make it so that LabVIEW reads each button press individually instead of checking it every loop iteration?

dahlboy15 19-02-2011 19:52

Re: Individual Button Presses
 
If I were you (and this is what I did) I would simply program the the claw so that when you press and hold the button it is open and when you release it closes. It makes it much easier to program.

Mark McLeod 19-02-2011 19:59

Re: Individual Button Presses
 
Depends on whether it's a motor or a solenoid.

Here's a single action per button press.
Here's a generic button toggle

captainking 19-02-2011 21:19

Re: Individual Button Presses
 
Mark, you have my undying gratitude, this has been a thorn in our side for a while now

MattCarey3625 20-02-2011 07:33

Re: Individual Button Presses
 
We are using analog voltage to limit and to determine open and closed we are using case structures instead of while loops for the actual commands.


All times are GMT -5. The time now is 09:13.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi