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?

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.

Depends on whether it’s a motor or a solenoid.

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

Mark, you have my undying gratitude, this has been a thorn in our side for a while now

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.