Go to Post Aha I just noticed you're from my team. --Petey - Petey [more]
Home
Go Back   Chief Delphi > Other > VEX
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-04-2009, 19:13
Imprudent Imprudent is offline
Registered User
AKA: Jenn
FRC #1281 (Mustang Robotics) FTC #478 (Mustang Robotics)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Canada
Posts: 39
Imprudent is an unknown quantity at this point
Autonomous only works 3 times after download

Hello,

In the course of my programming the VEX robot microcontroller, I have developed 4 different autonomous modes. In the modes, I use a combination of 2 encoders, 1 sonar sensor, 2 potentiometers and 5 line followers.

When I download the code, it will function perfectly for the first 3 trials but then it will start doing very strange things (ie; not turn, not move backwards, not stop moving backwards).

Has anyone else experienced this problem? If so, how did you fix it?
I realize that I could simply re-download the code before each match in Dallas but this will get rather frustrating and one more thing that we need to remember to do. Especially when we are in a rush or have other problems (usually mechanical) to deal with.

Thanks!

- Jenn
Reply With Quote
  #2   Spotlight this post!  
Unread 22-04-2009, 19:27
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
Re: Autonomous only works 3 times after download

Are you using easy C?

I would think that when you develop 4 different codes, after the third trail, something goes wrong with the logic and the code does something funky, ie not turn.

One recommendation is going through the code and physically saying outloud the path that the 4 codes actually take, maybe you'll find a problem.

Other than that I can only suggest that you post your code and we can try to debug it. .
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
Reply With Quote
  #3   Spotlight this post!  
Unread 22-04-2009, 20:13
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,935
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: Autonomous only works 3 times after download

Quote:
Originally Posted by Imprudent View Post
Hello,

...
When I download the code, it will function perfectly for the first 3 trials but then it will start doing very strange things (ie; not turn, not move backwards, not stop moving backwards).
...
Jenn
It sounds like there is a problem (along the lines of a memory leak) in the software, that isn't being detected by the compiler and linker, but has an effect that grows over time and eventually interferes with the robot's operation after the 3rd trial.

If you post the software someone might be able to spot the problem for you.

Blake
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
Reply With Quote
  #4   Spotlight this post!  
Unread 23-04-2009, 08:42
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,522
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Autonomous only works 3 times after download

I would guess that it's even more simple than that. Do you reinitialize all your variables to zero? If not, there's a good chance one or more of them are rolling over and causing your robot to do odd things.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-04-2009, 13:45
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,935
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: Autonomous only works 3 times after download

Quote:
Originally Posted by Tom Line View Post
I would guess that it's even more simple than that. Do you reinitialize all your variables to zero? If not, there's a good chance one or more of them are rolling over and causing your robot to do odd things.
My guess was that the microcontroller gets turned off and then back on to cause the autonomous to run for a 2nd, 3rd, ... time. Hence my suspicion that something other than remembering to reinit variables is the problem.
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
Reply With Quote
  #6   Spotlight this post!  
Unread 23-04-2009, 18:53
Imprudent Imprudent is offline
Registered User
AKA: Jenn
FRC #1281 (Mustang Robotics) FTC #478 (Mustang Robotics)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Canada
Posts: 39
Imprudent is an unknown quantity at this point
Re: Autonomous only works 3 times after download

I should have mentioned, I am using EasyC - sorry!
How can I post the entire code? It has many, many functions so it won't really make sense. I could e-mail it to anyone who would like to take a stab at it (let me know via PM).

Most of the variables are global and the same for all 4 modes. The others are all preset as needed (ie: encoders).
Reply With Quote
Reply


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
GetImage only works when dashboard running? EnigmaSolution NI LabVIEW 2 01-02-2009 14:03
Only Camera works in Dashboard keehun Programming 1 06-01-2009 07:22
New autonomous method in the works :D Spencer E. Programming 9 09-09-2007 19:16
Keepers after autonomous Spencer E. Rules/Strategy 30 05-03-2007 12:31
'Program State' LED stays blinking yellow after download clynch Control System 5 18-02-2004 19:34


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