Go to Post I'll wait for someone else to do it, then disagree with whatever they say. :p - Jcarbon [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2013, 12:36
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Encoder default distance per pulse

Does anyone know what it is? Other members of my teams made changes to the finalized code but i was using the default distance per pulse and i need to fix my values

e/ nvm its just 1.0

2e/ another question: whats the proportinal constant for converting an encoder value to degrees? (i want to turn 45 degrees but i need to know what to scale the encoder to)

Last edited by Arhowk : 17-02-2013 at 12:41.
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2013, 14:09
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Encoder default distance per pulse

Quote:
Originally Posted by Arhowk View Post
Does anyone know what it is? Other members of my teams made changes to the finalized code but i was using the default distance per pulse and i need to fix my values

e/ nvm its just 1.0
The distancePerPulse tells the Encoder object how far the robot travels in a single pulse so you can call the convenience method getDistance() that would return the robot distance traveled. To set the value you need to know the the wheel diameter, the number of encoder counts per revolution, and any transmission ratios that might apply.

Here's the code in WPILib to getDistance():
Code:
    public double getDistance() {
        return getRaw() * decodingScaleFactor() * m_distancePerPulse;
    }
You can see it simply takes the raw number of counts and multiplies it by the distance per pulse that you provide.
Quote:
Originally Posted by Arhowk View Post
2e/ another question: whats the proportinal constant for converting an encoder value to degrees? (i want to turn 45 degrees but i need to know what to scale the encoder to)
Do you mean for the robot to turn 45 degrees or are you looking for 45 degrees of shaft rotation?

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2013, 18:12
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Encoder default distance per pulse

I meant turn the robot 45 degrees :\

the constant i was looknig for is roughly 1727/90 for a 1 DPP
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi