Go to Post I clicked on "agree to terms" ........ crash. I think I killed the server. ;) - rees2001 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-02-2006, 20:47
DavidSJohnson DavidSJohnson is offline
Registered User
#0133
 
Join Date: Feb 2005
Location: Buxton, Maine
Posts: 3
DavidSJohnson is an unknown quantity at this point
Problem with GetGTSensor() ?

We installed the 2006 kit Gear Tooth Sensors into the transmissions as documented, yet regardless of which direction (or how fast/slow) the gears are driven, GetGTSensor() always increases from one call to the next, i.e. it never registers reverse motion by decrementing the count.
Is it possible that the logic to determine direction based upon pulse width is not working correctly? Did anyone else experience this?
This was not critical to our autonomous, and so I didn't pursue it in the crush to ship, but now I am curious as to what was going on, and would like to resolve this for the future.
  #2   Spotlight this post!  
Unread 26-02-2006, 22:07
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: Problem with GetGTSensor() ?

Quote:
Originally Posted by DavidSJohnson
We installed the 2006 kit Gear Tooth Sensors into the transmissions as documented, yet regardless of which direction (or how fast/slow) the gears are driven, GetGTSensor() always increases from one call to the next, i.e. it never registers reverse motion by decrementing the count.
Is it possible that the logic to determine direction based upon pulse width is not working correctly? Did anyone else experience this?
This was not critical to our autonomous, and so I didn't pursue it in the crush to ship, but now I am curious as to what was going on, and would like to resolve this for the future.
The gear tooth sensor requires 2 interrupts for each tick and the time between them determines the direction.

This has been a limitation in WPILib for the Gear Tooth Sensor. The problem is that the difference in the pulse width is very short, only about 40us. The code to save and restore state in an interrupt service routine is 50us. And if there are other interrupts overlapping it's impossible to compute the time.

If another device was currently interrupting when the gear tooth sensor pulse happened, getting into the interrupt service routine would be delayed by thge time it takes to get out of the other interrupt service routine and get into the gear tooth sensor.

Encoders work fine because they are a little slower - there is usually more time to read the other channel and figure out what's happening.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Closed Thread


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
The best thing you can do when reporting a problem .. Brandon Martus CD Forum Support 1 08-02-2006 07:46
Need a realistic Statics Problem sanddrag Technical Discussion 10 05-12-2005 15:07
Programming Problem: Extremely Frustrating chantilly_team Programming 19 12-02-2005 23:00
The problem with scouting... archiver 2001 10 23-06-2002 23:49
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44


All times are GMT -5. The time now is 03: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