View Single Post
  #8   Spotlight this post!  
Unread 23-11-2011, 08:58
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: [FTC]: Motor Encoder Help

Quote:
Originally Posted by Shadowfl View Post
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
Reply With Quote