Quote:
Originally Posted by Shadowfl
I wish we would program in Robot-C but Alzir, Slendyman and i are all working in labview
|
You can use the encoders several ways.
You can command the motor to move a certain distance at a given speed (the easiest way), or you can give the motor speed/power commands and watch the encoder value yourself to tell when it has gone the correct distance.
You will need to build a basic program template using the "Generate Code" option on LVLM (choose the "FTC Arm and Gripper" example), and then modify the code to do your specific task.
To see the VIs that are available, open the "TETRIX" pallette on the program Block Diagram. Turn on the Context Help (CTRL H) and roll over each of the available icons.
To run a set distance, use the "Fixed Distance" VI to specifcy encoder counts (1440 per revolution).
Or
Use the "Move Motors" command to start the motor, and then loop calling "DC Motor Status" to read the current encoder value.
For more information on general FTC programming, view the Webinars here:
http://www.tetrixrobotics.com/FTC/
Especially Webinar #4
Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org
FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor