[FTC]: Help with LabView and variables?

In LabView, we are attempting to make our servos move in increments for the duration that we press a button. However, with our current code, we are able to press a button, and upon that press, have our servo move to a set position. We would like to know how to “store” a variable and add a set number to it so that it moves the servo up/down in our set increment as long as our button is still pressed.


We are a rookie team, and have never used LabView before. All tips and suggestions are welcome!

Here is an example i drew up for you guys. To make it go reverse, just put another case structure in there. I am with FRC, but the logic should be the same.

servo example.vi (10.5 KB)

servo example.vi (10.5 KB)

I have also created an example and posted it the NI FTC Community page.

Open and Close Servo Incrementally with Game Pad Buttons

This example shows how you can use two game-pad buttons to incrementally increase and decrease the position value of a servo. The example also shows an efficient method of using a case structure with the FTC Read Buttons VI rather than using nested case structures.