Go to Post Ah, to be a teenager and know everything again. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 23-11-2008, 10:11
MorbidAngel's Avatar
MorbidAngel MorbidAngel is offline
Registered User
FTC #0392
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2012
Location: Niggaland
Posts: 11
MorbidAngel has a little shameless behaviour in the past
Encoders and distance (labview)

I'm trying to program for autonomous, using the encoders. However, the formula I'm using for finding the right number of ticks for one inch and such isn't working. Does anyone have a formula, or an input value for a distance of one inch? I'm using LabVIEW. Help me please ^^
Reply With Quote
  #2   Spotlight this post!  
Unread 23-11-2008, 11:51
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,708
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Encoders and distance (labview)

If you're using the encoder VIs, then they should be doing 4x decoding. That is, they'll return 4 ticks for every cycle of the encoder. So if your encoder is 1024 pulses/cycles per revolution, the VI will actually read 4096 ticks per revolution. After that, it's just properly figuring how many inches you have per revolution.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #3   Spotlight this post!  
Unread 23-11-2008, 11:53
billbo911's Avatar
billbo911 billbo911 is online now
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,372
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Encoders and distance (labview)

Quote:
Originally Posted by MorbidAngel View Post
I'm trying to program for autonomous, using the encoders. However, the formula I'm using for finding the right number of ticks for one inch and such isn't working. Does anyone have a formula, or an input value for a distance of one inch? I'm using LabVIEW. Help me please ^^
This is difficult to do without more information. Needed is: Ticks/rev of the encoder used, Gear ration in the drive AFTER the encoder has sampled, wheel diameter.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #4   Spotlight this post!  
Unread 23-11-2008, 12:18
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Encoders and distance (labview)

The formula you are looking for is this

Code:
distance = (ticks) * (Gear Ratio) * (wheel diameter * pi)/(ticks per rev * scale)
Where Gear ratio is amount of times the wheel spins per amount of times the encoder spins, and scale is 4 (per what Kevin said above).

As I last saw them, the WPI Robotics Library encoder VI's had provisioning for real world unit distance feedback. The VI's had setters and getters for the gear ratio and distance travelled, respectively.

Last edited by Tom Bottiglieri : 23-11-2008 at 12:21.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labview 8.5 and encoders MorbidAngel NI LabVIEW 1 15-11-2008 13:57
Help with Angles and distance charlie1218 Programming 5 13-12-2007 18:54
How do I get distance between Camera and the target? sjung9442 Programming 5 27-01-2006 09:44
EEPROM and Encoders Bharat Nain Electrical 7 01-12-2005 10:06
Testing and Cause of Failure for Encoders and Hall Effect sensors ChrisH Electrical 28 19-09-2005 01:07


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

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