Go to Post "I don't need an anniversary party. Use the money for the kids on the robotics team."- Walter Suchowiecki, BMS technician - Wayne C. [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-2005, 22:10
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
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
Question Unknown Blinky-light type Errors.

I have been having problems with my code for a while. I perpetually get some kind of program-state error (either the green-orange or just a time out), and I don't know why.

I had it going for a little while, but PID would only drive the wheels at 254 (nothing real PID about it). But then I changed the code and the problems came back.

Currently, I have the time-out error. It happens before the initialization message is printed. (Meaning all I see in the terminal is "IFI>", no "IFI 2005 User Processor Initialized ..."). It happens a second or two after a reset (it's green for a few seconds, then goes red). The green-orange (OGLOD?) happens immediately.

I have absolutely no idea where this is coming from. I have both the Navigation code and the Camera code (though the camera code is disabled at the moment).

Can anyone help me as to where I should look? I have no idea whatsoever as to what is the cause. I can post whatever code you want.
  #2   Spotlight this post!  
Unread 09-02-2005, 22:43
probizzle's Avatar
probizzle probizzle is offline
Registered User
AKA: Prabhas Pokharel
#0639 (Code Red)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Ithaca
Posts: 78
probizzle will become famous soon enoughprobizzle will become famous soon enough
Send a message via AIM to probizzle
Re: Unknown Blinky-light type Errors.

Quote:
Originally Posted by Astronouth7303
I have been having problems with my code for a while. I perpetually get some kind of program-state error (either the green-orange or just a time out), and I don't know why.

Currently, I have the time-out error. It happens before the initialization message is printed. (Meaning all I see in the terminal is "IFI>", no "IFI 2005 User Processor Initialized ..."). It happens a second or two after a reset (it's green for a few seconds, then goes red). The green-orange (OGLOD?) happens immediately.
I have had the same errors for a few days as well. I did notice that if I turned the OI off, the blinky lights would go away after reset, and would come back on after reset if OI was on.

Also, I noticed http://www.chiefdelphi.com/forums/sh...threadid=34301. Did that fix it for you? (I will try to check all my printfs tomorrow).
__________________
Code Red Team 639 Winners of the 2005 FingerLakes Regional with 191 and 494.
--
http://pset.deu83.com << my baby
http://www.setgame.com/set/ << it's mother
  #3   Spotlight this post!  
Unread 10-02-2005, 18:34
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
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
Re: Unknown Blinky-light type Errors.

Quote:
Originally Posted by probizzle
Also, I noticed http://www.chiefdelphi.com/forums/sh...threadid=34301. Did that fix it for you? (I will try to check all my printfs tomorrow).
Not entirely. Just took me from green-orange to a normal red/time-out.
  #4   Spotlight this post!  
Unread 11-02-2005, 08:41
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Unknown Blinky-light type Errors.

I'd need to see the whole project to track a problem like this one down.
I'd also like to know what external sensors you have hooked up and the theoretical (or actual) interrupts per second you expect.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 11-02-2005, 13:47
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Unknown Blinky-light type Errors.

I was getting the same error for a while when I was trying to get interrupts working. I eventually abandoned that at about week 3 and just went with polling. Not sure what caused the problem... It'll probably end up being an after season project.
__________________

  #6   Spotlight this post!  
Unread 11-02-2005, 18:22
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
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
Re: Unknown Blinky-light type Errors.

Quote:
Originally Posted by Mark McLeod
I'd need to see the whole project to track a problem like this one down.
I'd also like to know what external sensors you have hooked up and the theoretical (or actual) interrupts per second you expect.
Currently, we have just the drive train and encoders hooked up. I'm using primarily the Navigation/camera code. The generated doxygen version can be found (hopefully) at http://endeavour.zapto.org/astro73/tgdocs/.

The ZIP version is at http://endeavour.zapto.org/astro73/tg_2005.zip. I couldn't get it under 100 KB.
  #7   Spotlight this post!  
Unread 11-02-2005, 20:51
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
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
Re: Unknown Blinky-light type Errors.

(see my other post for other half.)

The problem seems to be fixed by removing the double calls to OpenADC(). Check gyro.c and ifi_utilities.c for the implementation.
  #8   Spotlight this post!  
Unread 11-02-2005, 21:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Unknown Blinky-light type Errors.

So you found and solved the problem.
That's good news!
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #9   Spotlight this post!  
Unread 12-02-2005, 01:11
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,335
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: Unknown Blinky-light type Errors.

Quote:
Originally Posted by Astronouth7303
(see my other post for other half.)

The problem seems to be fixed by removing the double calls to OpenADC(). Check gyro.c and ifi_utilities.c for the implementation.
You're using gyro code that is two revisions behind. I would dump that code and use the latest. BTW, what was the problem (I'm having trouble keeping track of the various CD and e-mail discussions I've got going)? Was it something knuckleheaded I was doing?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 12-02-2005, 09:00
Jeff G Jeff G is offline
Registered User
#0648
 
Join Date: Nov 2004
Location: Quad Cities, IL & IA
Posts: 5
Jeff G is an unknown quantity at this point
Re: Unknown Blinky-light type Errors.

Quote:
Originally Posted by Astronouth7303
I have been having problems with my code for a while. I perpetually get some kind of program-state error (either the green-orange or just a time out), and I don't know why.
I had a similar problem. The code would work fine after a download, but would cause a fault shortly after a reset.

I my case it was due to commenting out the serial initialization but not removing code from the interupt handler that looked at these pins. I suspect the state of the serial pins can float during an FRC reset, then the interupt handler attempts to go somewhere it can't. Either way, including the serial initialization cleared the problem.

Jeff
  #11   Spotlight this post!  
Unread 12-02-2005, 12:24
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
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
Re: Unknown Blinky-light type Errors.

Quote:
Originally Posted by Kevin Watson
You're using gyro code that is two revisions behind. I would dump that code and use the latest. BTW, what was the problem (I'm having trouble keeping track of the various CD and e-mail discussions I've got going)? Was it something knuckleheaded I was doing?

-Kevin
Sorry, I didn't make either post very clear.

In the old version of the gyro code, the initialize function would call OpenADC() but not CloseADC(), leaving the A/D converter open. If you wanted to get an analog value by calling IFI's function, it would also call OpenADC(), which is probably bad, and CloseADC(), also bad. The interupt that handled the gyro doesn't call anything other than to get the value. The only way this would work is if Microchip's code kept track of nested Opening/closing of the ADC.

The way I solved this is that I put Set_Analog_Channels() in an Initialize_Analog_Channels() (or similar) call, which would call OpenADC(). Then I changed Get_Analog_Value() so it set the analog channel without opening/closing. I also changed the Gyro interupt so that it would switch channels as well.

I haven't checked this yet for the new code, I'm in the process of merging them. And a few of the function names are probably wrong.
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
Light Sensor Type, Please Help! Alexander McGee Electrical 7 20-11-2004 21:48
How many users does it take to change a Light Bulb? Matt Attallah Chit-Chat 4 04-09-2004 20:59
Please...no more steenkin' light! Andrew General Forum 37 17-04-2003 23:06
light visibility Erinn888 General Forum 30 17-02-2003 15:56
Important info about light Jay Lundy Technical Discussion 10 12-04-2002 11:37


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

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