Go to Post But please, don't attempt to subvert the rules. It almost invariably becomes more trouble than it's worth. - Billfred [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 08-04-2005, 15:04
Plloyd Plloyd is offline
Registered User
no team
 
Join Date: Sep 2004
Location: Toronto
Posts: 6
Plloyd is an unknown quantity at this point
Intermittent Code Error

Every once in a while, (0-1 times per match) our robot disables itself and the code error light comes on... requiring the drivers to push robot reset to clear the error and continue playing. This has happened on more than one RC, so it probably is a problem with the code.

Now... this happened at a regional and the IFI representative there informed me that his scanner picked up an "Invalid CONTROL or CURRENT_MODE byte" error.

Looking at the code... the control and current_mode bytes are the last two bytes of txdata. However, I am not using them in the code at all... nor am I using the bytes immediately prior to them (essentially ruling out a runover memory leak).

This problem is not dehabilitating... but it has been nagging me for a while. Does anyone have any ideas/theories as to why this may be happening?

Thanks,
Plloyd
  #2   Spotlight this post!  
Unread 08-04-2005, 15:21
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Intermittent Code Error

You should try re-installing your firmware, do you have version 10? (They should've checked to made sure at the regionals, but they might not have)
__________________
http://www.mikesorrenti.com/
  #3   Spotlight this post!  
Unread 08-04-2005, 15:27
vtrehan's Avatar
vtrehan vtrehan is offline
Mentor - Controls & Programming
AKA: Vivek Trehan
FRC #1241 (Theory6)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Mississauga, ON
Posts: 38
vtrehan is on a distinguished road
Send a message via Yahoo to vtrehan
Re: Intermittent Code Error

Hey Plloyd,

Can you describe when this actually happens in the game?

We had a similar problem for a couple of practice matches in which we had blocked out our autonomous mode, so sometimes when the went from auton to user-controlled mode, the code error on the RC would light up and robot was disabled until reset was pressed. It turned out that while blocking out the auton mode we had blocked out the entire code including the getrxdata and putrxdata commands which lead to the error. As soon as they were put in the problem stopped.

Hope this helps, if you could describe your problem and your code in more detail it would be great.

Take it easy,
Vivek.
__________________
2006-GM Industrial Design Award - Greater Toronto Super Regional
2006-Engineering Inspiration Award - Arizona Regional
2006-Regional Finalist - Arizona Regional

2005-Best Defensive Robot - Wonderland Off-Season
2005-Regional Chairman's Winners - Greater Toronto Regional
2005-Regional Champions - Waterloo (Thanks 68 and 1305)
2005-Best Website - Greater Toronto Regional
2005-Team Spirit Award - Waterloo
2005-Entreprenuership Award - Waterloo

2004-Rookie All-Star award - Great Lakes Regional
2004-Rookie Highest Seed - Greater Toronto Regional
2004-Rookie All-Star award - Greater Toronto Regional
2004-Team Spirit award - Greater Toronto Regional
2004-Team Spirit award - National Championship


  #4   Spotlight this post!  
Unread 08-04-2005, 17:17
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Intermittent Code Error

Did you make any changes to the serial communication portions of the default code? This can cause your controller to hang up.
__________________
-
An ounce of perception is worth a pound of obscure.
  #5   Spotlight this post!  
Unread 08-04-2005, 23:49
Plloyd Plloyd is offline
Registered User
no team
 
Join Date: Sep 2004
Location: Toronto
Posts: 6
Plloyd is an unknown quantity at this point
Re: Intermittent Code Error

Unfortunately, I have not been able to pinpoint a specific action which causes the code error (or makes it more likely to occur)... but for the most part the robot performs and operates perfectly.
I am using firmware version 10 and have not modified any of the write protected files in the default code (that includes the serial communication functions)... but I am using hall effect sensors (basically just kevin watson's encoder code), and a gyro (again, kevin watson's).

Any help is appreciated.

Thanks,
-Plloyd
  #6   Spotlight this post!  
Unread 08-04-2005, 23:51
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: Intermittent Code Error

This has happened to me. I suspect that it is as a result of the main loop taking too long to execute (because of the interrupts...). It is just a speculation, but it may be correct.
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #7   Spotlight this post!  
Unread 08-04-2005, 23:58
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: Intermittent Code Error

Quote:
Originally Posted by Joel J.
This has happened to me. I suspect that it is as a result of the main loop taking too long to execute (because of the interrupts...). It is just a speculation, but it may be correct.
Yes, this would be my guess as well. How many (peak) interrupts per second are being generated? Does this happen when the 'bot isn't moving?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #8   Spotlight this post!  
Unread 09-04-2005, 00:01
ColleenShaver's Avatar
ColleenShaver ColleenShaver is offline
Asst Dir, WPI Robotics Resource Ctr
FRC #0190 (Gompei and the HERD)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Clinton/Worcester, MA
Posts: 399
ColleenShaver is a glorious beacon of lightColleenShaver is a glorious beacon of lightColleenShaver is a glorious beacon of lightColleenShaver is a glorious beacon of lightColleenShaver is a glorious beacon of lightColleenShaver is a glorious beacon of light
Send a message via AIM to ColleenShaver
Re: Intermittent Code Error

We had the same problem our first regional and it was more of a hassle than anything (we have a gyro that takes a few seconds to recal everytime the robot resets). The IFI Rep gave us the same feedback as you as to what it was showing. It was occuring at various points in the match too (auto, switch from auto to operator mode, during operator mode). In the end it ended up being what Joel was saying above and it was a problem with the interrupts and how many times per second they were being called (I'm not programmer, so my guys can correct me if I'm wrong).

We just modified that and we have not had an issue with it since (knock on wood).
__________________
Colleen Shaver (Traitor) - Assistant Director, WPI Robotics Resource Center
FRC190 WPI/Mass Academy (2001-Present) :: FRC246 BU/O'Bryant School (2000) :: FRC126 Nypro/Clinton High (1996-1999)

  #9   Spotlight this post!  
Unread 09-04-2005, 16:14
Plloyd Plloyd is offline
Registered User
no team
 
Join Date: Sep 2004
Location: Toronto
Posts: 6
Plloyd is an unknown quantity at this point
Re: Intermittent Code Error

I believe we are running the gyro at 400Hz, and the hall effects can trigger up to 20 interrupts per cycle (total). Does that sound excessive?

I had also thought that the code may be taking too long to execute (since the code error light is supposed to indicate an infinite loop), but I dont think that we have had any code errors during autonomous mode... which has a lot more calculations to go through than our default routine. Does anyone have any ideas that could explain this?

As for when this happens during the match, I honestly dont know. I will definitely be asking the drivers and coach more questions next time I see them.

Thanks for all the responses... this has been really helpful.

Thanks,
Pete
  #10   Spotlight this post!  
Unread 09-04-2005, 21:37
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: Intermittent Code Error

If you don't need the Hall Effects while running manual mode, your could turn the interrupts off in Default_Routine

Thanks,
Eric
__________________

Don't PANIC!
S. P. A. M.
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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Error w/ FRC code JamesBrown Programming 2 08-01-2005 16:17
heres the code. y this not working omega Programming 16 31-03-2004 15:18
C++ Code Error? Adam Shapiro Programming 9 20-01-2003 13:24


All times are GMT -5. The time now is 00:16.

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