Log in

View Full Version : [FTC]: Help with LabView and variables?


cougarbytes
03-12-2009, 15:56
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.

:confused:

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

jmanela
29-12-2009, 15:14
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.

BLAQmx
29-12-2009, 15:57
I have also created an example and posted it the NI FTC Community page.

Open and Close Servo Incrementally with Game Pad Buttons (http://decibel.ni.com/content/docs/DOC-8692)

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.