Go to Post The low bar will make your electronics team cry. - Joe G. [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 09-02-2008, 10:32
Sykan's Avatar
Sykan Sykan is offline
Lead Programmer
AKA: David
FRC #0540 (Team 540)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Virginia
Posts: 24
Sykan is on a distinguished road
Re: KOP Gear Tooth Encoder Trouble

I don't think it's my printf statement because I'm using kevin printf. and it's a con. zero.

The printf statment I made was to read the rc dig itself so I see if the variable is changing and since it's a dig input it can only change 0 to 1 and back again.

the pwm connected is connected correctly.

Any other guesses?
  #2   Spotlight this post!  
Unread 09-02-2008, 11:20
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: KOP Gear Tooth Encoder Trouble

Quote:
Originally Posted by Sykan View Post
I don't think it's my printf statement because I'm using kevin printf. and it's a con. zero.

The printf statment I made was to read the rc dig itself so I see if the variable is changing and since it's a dig input it can only change 0 to 1 and back again.

the pwm connected is connected correctly.

Any other guesses?
It takes longer to print a single character then the time the gear tooth sensor's output is 1. The chances that you would actually catch the output high is very low.

If you follow Alan's post about how to print a long, you should see it counting up.

Make sure you aren't using the bad board too. Read this post: http://www.chiefdelphi.com/forums/sh...ad.php?t=62856
  #3   Spotlight this post!  
Unread 09-02-2008, 11:26
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: KOP Gear Tooth Encoder Trouble

It could also be the problem that teams have been experiencing with the KOP gear tooth sensors. We connected both of ours up (one good, one bad) the good one worked fine, the bad one gave us a value of 1 after moving it for a while.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #4   Spotlight this post!  
Unread 09-02-2008, 11:39
fabalafae's Avatar
fabalafae fabalafae is offline
Guardian of the Grimmerie
FRC #0540 (TALON)
Team Role: Programmer
 
Join Date: Nov 2007
Rookie Year: 2007
Location: Richmond, VA
Posts: 33
fabalafae is an unknown quantity at this point
Re: KOP Gear Tooth Encoder Trouble

The printf works now; it wasn't the long int problem, it was something else. But anyway...

The encoder printf is now remaining stable at 2560 and fluctuating to 768 every few times.

And also it's the good encoder, not the bad one.

We have a big code problem: it's putting out 2560 and 768 and 0 and 5 (and other miscellaneous random values) WITHOUT as well as WITH the encoder connected...uhm...

Any ideas? Please?
__________________
I am stricken and can't let you go
When the heart is cold, there's no hope, and we know
That I am crippled by all that you've done
Into the abyss will I run
  #5   Spotlight this post!  
Unread 09-02-2008, 11:45
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: KOP Gear Tooth Encoder Trouble

What version of Kevin's code are you using? We've had no problems with his code so far except stuff we did wrong. Make sure you have read the README's, as there are more steps to getting the sensors to work than you would think. We're using the version made for 3.0, and I really like it. Some things are simpler than I thought, like the Get_Analog_Value() function, all you have to do is put a number in... very simple. I would recommend using 3.0 if you're not using it already.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #6   Spotlight this post!  
Unread 11-02-2008, 11:39
fabalafae's Avatar
fabalafae fabalafae is offline
Guardian of the Grimmerie
FRC #0540 (TALON)
Team Role: Programmer
 
Join Date: Nov 2007
Rookie Year: 2007
Location: Richmond, VA
Posts: 33
fabalafae is an unknown quantity at this point
Re: KOP Gear Tooth Encoder Trouble

We're using the latest version of Kevin's code- and we downloaded it again, just to be sure. Yeah, the encoders still don't work.

I don't know what else we can try, but I guess we'll still be working on finding the problem this afternoon after school.
__________________
I am stricken and can't let you go
When the heart is cold, there's no hope, and we know
That I am crippled by all that you've done
Into the abyss will I run
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
Gear Tooth Sensor marco_alchemy Electrical 7 06-02-2008 09:54
Shaft encoder in KOP transmission? MrForbes Electrical 7 24-01-2008 11:40
Gear encoder code Demothesis Programming 8 20-07-2007 17:15
Gear Tooth Sensor Trouble cprogrammer Programming 1 24-01-2006 13:48
Turning a gear-tooth sensor into a quadrature output encoder Jared Russell Programming 4 18-01-2006 22:19


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

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