View Single Post
  #8   Spotlight this post!  
Unread 26-01-2012, 13:40
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Labview encoders in autonomous

Quote:
Originally Posted by Alan Anderson View Post
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.
Alan,

I have not yet managed to read the encoder value because we don't have encoders on our robot from last year, which I'm using to play with programming right now.

I do not currently know how to calculate the number of encoder counts for my distance. I'm pretty i just need to find the converting factor that is usually provided with the encoder or I could find it online.

I'm not exactly sure how to do a comparison function in Labview, though I'm sure I could find it.

I'm pretty good at using case structures to do certain things, though I usually only used them last year for buttons on the joysticks. Not really related to using them for encoders, but I'm pretty sure I could make it happen with case structures.

The way you described that would be the simplest method was exactly how I was thinking it. Find the distance I need and how many counts it would be. Run the encoder and the motors until the encoder hits this value. At that point, I would set the motors to 0/stop. Also, I would set my speed to something like .5 or .7 to lessen the chance of it overshooting my projected distance.
Reply With Quote