OCCRA
Go to Post Safe zones are for the weak. - ChristopherSD [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 02-21-2004, 09:35 PM
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Conflict between "Initialize_Tracker()" and "pwm13 & pwm15"? Kevin?

I got my manual driving code working pretty well, and it was time to move on to IR tracking. I hooked up beacons and made IR servo trackers, loaded Kevin's tracker code, and it worked! Yay.

So I merged the code from the tracker codebase into my code for non-autonomous driving, including dropping Kevin's user_routines_fast.c in place of the default one, and things got weird. No navigation code at all, just tracker code. The trackers would run okay, but the motors, connected to pwm13 and pwm15, started running and stopping, jerking on and off. The manual joystick driving still worked, sort of.

So I started removing bits of Kevin's code to see what was messing me up. I turned off all the code in Process_Data_From_Local_IO(). That didn't help. Then I turned off the call to Initialize_Tracker() that I had added in User_Initialization(), and that stopped the erratic behavior. And the trackers, too, of course.

I thought the code was running too long, so I measured the code duration by hooking up a scope to a digital out, and in main.c set it to '1' just before the call to Process_Data_From_Master_uP() and to '0' just after the call to Process_Data_From_Local_IO. My code runs in about 4 ms.

Today I found Kevin had a new version of tracker.zip posted on kevin.org. I merged that code with mine. No improvement. Darn.

Finally, sensing that there is something "different" about pwms 13, 14, 15, 16, I connected my motors to pwm10 and pwm11, turned all the tracking code back on, and everything worked nicely! That was at the end of the day, so I didn't get a chance to try any navigation...

So, can someone tell me why changing the motors from 13 and 15 to 10 and 11 changed the behavior from erratic to normal??? What's going on here?

-Norm
  #2   Spotlight this post!  
Unread 02-21-2004, 09:44 PM
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
An inspired alumnus
AKA: Jamie Bliss
no team (previously 904 (D-cubed) and 1227 (Techno-Gremlins))
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Send a message via ICQ to Astronouth7303 Send a message via AIM to Astronouth7303 Send a message via MSN to Astronouth7303 Send a message via Yahoo to Astronouth7303
Re: Conflict between "Initialize_Tracker()" and "pwm13 & pwm15"? Kevin?

Go through Kevin's code and check very carefully what goes where. I'd replace them with aliases, if he hasn't yet.

I, personnally, wouldn't have just replaced the file. Just copy/paste everything. That way, I know what's going in.
  #3   Spotlight this post!  
Unread 02-22-2004, 12:14 AM
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Re: Conflict between "Initialize_Tracker()" and "pwm13 & pwm15"? Kevin?

the function generate_pwms(). Something about pwms13-16 is strange and you have to run them through the function generate_Pwms() (or something like that) to have them run correctly (i think it has to do w/ timing and they way some of the outputs are on the chip). all in all, i just avoid 13-16, and try to stick to 1-12.

-Kesich
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
  #4   Spotlight this post!  
Unread 02-22-2004, 02:55 AM
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,332
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Conflict between "Initialize_Tracker()" and "pwm13 & pwm15"? Kevin?

Quote:
Originally Posted by gnormhurst
I got my manual driving code working pretty well, and it was time to move on to IR tracking. I hooked up beacons and made IR servo trackers, loaded Kevin's tracker code, and it worked! Yay.
Geez, why do people act so suprised when my stuff works .



Quote:
Originally Posted by gnormhurst
So, can someone tell me why changing the motors from 13 and 15 to 10 and 11 changed the behavior from erratic to normal??? What's going on here?
PWMs 13 through 16 are controlled by the user processor. I saw the wacky behavior you described while developing the receiver and tracking code. The problem isn't with my code (as far as I know). The IFI folks know about this and wrote it up.

-Kevin
__________________
Kevin Watson
Engineer at Virgin Galactic
http://kevin.org
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


All times are GMT -5. The time now is 01:17 AM.

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


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