Go to Post No, I dont mix robots and girls. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 21-01-2009, 21:24
Questions4mQ202 Questions4mQ202 is offline
Registered User
FRC #2348
 
Join Date: Jan 2009
Location: Hawaii
Posts: 3
Questions4mQ202 is an unknown quantity at this point
Reading Encoders?

There were many posts that were very useful regarding how to wire up the encoders (I believe, they were Andy Mark). But before we get into the fun stuff of splicing the wires, our adviser insists that we figure out how to read its output values, so Programming can do their job. Would anyone happen to know how we can test this?

Thanks much in advance!
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2009, 21:53
elcron elcron is offline
Programmer
FRC #0348
Team Role: Programmer
 
Join Date: Apr 2008
Rookie Year: 2008
Location: MA
Posts: 3
elcron is an unknown quantity at this point
Re: Reading Encoders?

Are you using labview or C++?

If Your using C++ wpilib has an encoder class.
PHP Code:
Encoder *= new Encoder(12); //1 & 2 = your dig io pins for channel a & b
e->Start();
int distance e->GetDistance();
// use distance for whatever you want 
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2009, 23:03
keehun's Avatar
keehun keehun is offline
Team Captain
AKA: Keehun Nam
FRC #2502 (EP Robotics)
Team Role: Leadership
 
Join Date: May 2008
Rookie Year: 2008
Location: Eden Priaire
Posts: 474
keehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond repute
Send a message via AIM to keehun
Re: Reading Encoders?

The output values are easy to read. But they can be done only once you splice up the wires. I suggest you probe it on to a Oscilloscope and look at the quadrature signals. As you ramp up the motor, the signals should come closer to each other. If there's not a ton of noise, and if it looks "alright" then you should splice it. I wish they gave us two PWM outs instead of 1 4-lane cable.

Once you splice it and connect the correct A & B ports, then it's really simple, just go to WPI Libraries -> Sensors -> Encoders and do the usual thing with Open, Get, Close. Though, this time, you may want to fiddle around with the Configuring the Timers.
__________________
For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast. -- Ephesians 2:8-9
2010: Quarter Finalist (MN 10,000 Lakes)
2010: Website Award (MN 10,000 Lakes)
2009: Quarter Finalist (MN 10,000 Lakes)
2009: GM Industrial Award (MN 10,000 Lakes)
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2009, 19:19
drkiraco drkiraco is offline
Registered User
FRC #1747
 
Join Date: Jan 2009
Location: Lafayette IN
Posts: 23
drkiraco will become famous soon enoughdrkiraco will become famous soon enough
Re: Reading Encoders?

It's pretty easy in labview. There's an encoder vi in the library. Just tell it what digital IO pins you've connected it to and that's all there is to it.

Quote:
Originally Posted by Questions4mQ202 View Post
There were many posts that were very useful regarding how to wire up the encoders (I believe, they were Andy Mark). But before we get into the fun stuff of splicing the wires, our adviser insists that we figure out how to read its output values, so Programming can do their job. Would anyone happen to know how we can test this?

Thanks much in advance!
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2009, 20:51
dani190 dani190 is offline
Registered User
AKA: Dani
FRC #2185 (RoboRams)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Canada
Posts: 164
dani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to behold
Send a message via MSN to dani190
Re: Reading Encoders?

how accurate are your encoders? Our mentor says 1 of the values wasn't returning that well...

I think he said it know the distance but not the rotations or something...

Also do these break easy? im guessing we should have extras?
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2009, 22:22
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Reading Encoders?

Quote:
Originally Posted by dani190 View Post
how accurate are your encoders? Our mentor says 1 of the values wasn't returning that well...

I think he said it know the distance but not the rotations or something...

Also do these break easy? im guessing we should have extras?
The encoders do not return the correct value for rate.
Here is the announcement of the bug:
http://forums.usfirst.org/showthread.php?t=11343

Here is the thread that isolated the bug:
http://forums.usfirst.org/showthread.php?t=11004
Reply With Quote
  #7   Spotlight this post!  
Unread 23-01-2009, 22:27
dani190 dani190 is offline
Registered User
AKA: Dani
FRC #2185 (RoboRams)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Canada
Posts: 164
dani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to behold
Send a message via MSN to dani190
Re: Reading Encoders?

ok so reading through the isolated thread, dont really see how to fix the issue...

sorry just clarify what you meant, isolate as in just push the problem aside? or isolate as in fix the rate problem?
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 23-01-2009, 22:40
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Reading Encoders?

Quote:
Originally Posted by dani190 View Post
ok so reading through the isolated thread, dont really see how to fix the issue...

sorry just clarify what you meant, isolate as in just push the problem aside? or isolate as in fix the rate problem?
By "isolated the bug" he means that it discovered the source. As indicated in the first thread that he linked to the bug is going to be addressed in the next software update.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #9   Spotlight this post!  
Unread 23-01-2009, 22:41
dani190 dani190 is offline
Registered User
AKA: Dani
FRC #2185 (RoboRams)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Canada
Posts: 164
dani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to beholddani190 is a splendid one to behold
Send a message via MSN to dani190
Re: Reading Encoders?

ok thanks a lot.
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 23-01-2009, 23:51
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Re: Reading Encoders?

does anyone know when the next update will be coming out?
Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2009, 22:23
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Reading Encoders?

I hope soon for our sake!
Reply With Quote
  #12   Spotlight this post!  
Unread 25-01-2009, 01:57
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Reading Encoders?

It went beta the first of last week - I thought it was going to be released by the end of the week.
Reply With Quote
  #13   Spotlight this post!  
Unread 25-01-2009, 20:28
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Reading Encoders?

The thread on the FIRST forums suggests a new update will be out tomorrow (Monday). The issue should now be resolved.
Reply With Quote
  #14   Spotlight this post!  
Unread 25-01-2009, 20:47
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
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: Reading Encoders?

It's supposed to come out sometime tomorrow (Monday) and the encoder problem is fixed. If you were just reading distance or the count, that has always worked. The problem was just with reading the period or rate.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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
Reading Interrupt Ports ManicMechanic VEX 3 26-06-2008 12:43
Books Worth Reading Mr.D Chit-Chat 2 24-01-2006 13:50
Bathroom Reading Eugenia Gabrielov Chit-Chat 28 15-04-2005 17:49
reading rainbooooow! Nelly51987 Chit-Chat 22 15-05-2003 13:55
Time reading ChiefDelphi Wetzel Chit-Chat 23 28-02-2002 06:45


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

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