View Single Post
  #1   Spotlight this post!  
Unread 26-01-2012, 00:30
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Labview encoders in autonomous

Quote:
Originally Posted by jhellr13 View Post
Look, I basically want to be able to drive the robot in autonomous to whatever distance I set the encoder to go. I looked at the example, but that is not really any help.
Have you managed to read the encoder value?

Do you know how to calculate the number of encoder counts that represents the distance you want to travel?

Do you know how to do a comparison function in LabVIEW?

Do you know how to use a Case structure in LabVIEW to do different things based on a value?

The simplest thing to do is to continuously read the encoder and run the robot forward only when the value is less than the distance you want to travel. You'll probably coast past the destination unless you have your speed controllers set to "brake" mode.
Reply With Quote