Go to Post This is the best experience you will ever get. - Arefin Bari [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 15-02-2004, 10:26
Argoth Argoth is offline
Registered User
AKA: The Prez
#1255 (Team Blarglefish)
 
Join Date: Oct 2003
Rookie Year: 2004
Location: Texas
Posts: 41
Argoth can only hope to improve
Dangerous.....Code problem?!?

Does anyone know if the code resets after being on for too long? Yesterday, we were working on code for our arm, and one of our engineers was messing with the joystick for the arm (he had it backwards when this happened). The robot suddenly just kicked on full foward until it came crashing into my shin, a full foot away , then it quit! We turned it off and when we turned it on again, our sponsor was leaning over it reactivating the kill switch so the bot could be on again, and it just kicked on again!!!! Our arm scratched our sponsor's neck and then went crashing into MY OTHER SHIN! Soooo now that you know the circumstances, why did it do that .
__________________
BEWARE OUR ROBOT, It has serious anger issues. Prone to attack whatever is infront of it randomly! Tried to cut our sponsors jugular!

"A common mistake that people make when trying to design something completly foolproof was to underestimate the ingenuity of fools." ~Douglas Adams~
  #2   Spotlight this post!  
Unread 15-02-2004, 10:38
tophq's Avatar
tophq tophq is offline
mastr of autodsk (or not)
AKA: Chris Payk
#0703 (Inferno)
Team Role: Programmer
 
Join Date: Dec 2003
Location: Saginaw, MI
Posts: 19
tophq is an unknown quantity at this point
Re: Dangerous.....Code problem?!?

my only guess would be that maybe the engineer accidentally bumped the trim wheel when he was messing with the controls. i wasn't there so that's all i can think of. sporry about the injury to both of you though.
  #3   Spotlight this post!  
Unread 15-02-2004, 10:45
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Dangerous.....Code problem?!?

Quote:
Originally Posted by Argoth
Does anyone know if the code resets after being on for too long? Yesterday, we were working on code for our arm, and one of our engineers was messing with the joystick for the arm (he had it backwards when this happened). The robot suddenly just kicked on full foward until it came crashing into my shin, a full foot away , then it quit! We turned it off and when we turned it on again, our sponsor was leaning over it reactivating the kill switch so the bot could be on again, and it just kicked on again!!!! Our arm scratched our sponsor's neck and then went crashing into MY OTHER SHIN! Soooo now that you know the circumstances, why did it do that .
I don't think the code resets itself. Maybe it was because the engineer hit the joystick, and you values were reversed also (so full back on the joystick would go foward). Sorry to hear about that though
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #4   Spotlight this post!  
Unread 15-02-2004, 10:50
Argoth Argoth is offline
Registered User
AKA: The Prez
#1255 (Team Blarglefish)
 
Join Date: Oct 2003
Rookie Year: 2004
Location: Texas
Posts: 41
Argoth can only hope to improve
Re: Dangerous.....Code problem?!?

I too would say that the engineer bumped the joystick, except we didn't have either joystick plugged into the first or second port. (we are running our bot of two joysticks) We had them plugged into port three and four because we havent gotton the two new ones we ordered yet. We were watching our victors and no signal was going to the victors controlling the motors(the signals were going to the victors controling the arm ).
__________________
BEWARE OUR ROBOT, It has serious anger issues. Prone to attack whatever is infront of it randomly! Tried to cut our sponsors jugular!

"A common mistake that people make when trying to design something completly foolproof was to underestimate the ingenuity of fools." ~Douglas Adams~
  #5   Spotlight this post!  
Unread 15-02-2004, 10:52
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Dangerous.....Code problem?!?

Maybe something screwy happened in the code maybe?
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #6   Spotlight this post!  
Unread 15-02-2004, 11:17
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Dangerous.....Code problem?!?

The simple answer is to put the robot on blocks until you've debugged the control system.
  #7   Spotlight this post!  
Unread 15-02-2004, 11:46
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Dangerous.....Code problem?!?

It may be the WDT or the Watchdog Timer. It actually resets the pic microcontroller if WDT is not reset after a specific amount of time. That is the only thing I could think of that can reset the PIC. Though I don't even know if that specific PIC contains it.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
  #8   Spotlight this post!  
Unread 15-02-2004, 11:49
Argoth Argoth is offline
Registered User
AKA: The Prez
#1255 (Team Blarglefish)
 
Join Date: Oct 2003
Rookie Year: 2004
Location: Texas
Posts: 41
Argoth can only hope to improve
Re: Dangerous.....Code problem?!?

Quote:
Originally Posted by Adam Y.
It may be the WDT or the Watchdog Timer. It actually resets the pic microcontroller if WDT is not reset after a specific amount of time. That is the only thing I could think of that can reset the PIC. Though I don't even know if that specific PIC contains it.
I will look into that and see if that is what happened. (My shins thank you very much.) I am not keen on having that thing come charging at me again!
__________________
BEWARE OUR ROBOT, It has serious anger issues. Prone to attack whatever is infront of it randomly! Tried to cut our sponsors jugular!

"A common mistake that people make when trying to design something completly foolproof was to underestimate the ingenuity of fools." ~Douglas Adams~
  #9   Spotlight this post!  
Unread 15-02-2004, 12:22
Phil_Lutz's Avatar
Phil_Lutz Phil_Lutz is offline
Phil Lutz
#0851 (Froggers)
Team Role: Mentor
 
Join Date: Jan 2004
Location: El Segundo, CA
Posts: 67
Phil_Lutz is on a distinguished road
Send a message via Yahoo to Phil_Lutz
Re: Dangerous.....Code problem?!?

1. Trace the code.
2. You need to ensure that the controls are being neutralized on start.
3. Are you jumping into auton mode? shorts, etc.

Before we switch the breaker on our bor, we tell everyone in a loud voice, Stand clear, Robot starting up.

Only one person near the robot during fire-up.
Only one person near joysticks/oi controls (to ensure no knocking of controls) Activate breaker in a 'safe' position.
(no ties hanging down, hand not in treads zone, not in front of bot, etc.)

To quote a motto (I think OSHA), "Safety is no accident"

Phil
  #10   Spotlight this post!  
Unread 15-02-2004, 12:30
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Dangerous.....Code problem?!?

Quote:
Only one person near the robot during fire-up.
Also make sure the robot is off before you stick your fingers in it. Yeah you can imagine what happened.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
  #11   Spotlight this post!  
Unread 15-02-2004, 14:52
steven114 steven114 is offline
Programming Wizard and Team Captain
AKA: Steven Schlansker
FRC #0114 (Eaglestrike)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Los Altos, CA
Posts: 335
steven114 is a jewel in the roughsteven114 is a jewel in the roughsteven114 is a jewel in the rough
Send a message via AIM to steven114
Re: Dangerous.....Code problem?!?

From the chip docs:
Quote:
PIC18F6520/8520/6620/8620/6720/8720
3.0 RESET
The PIC18FXX20 devices differentiate between
various kinds of Reset:
a) Power-on Reset (POR)
b) MCLR Reset during normal operation
c) MCLR Reset during Sleep
d) Watchdog Timer (WDT) Reset (during normal
operation)
e) Programmable Brown-out Reset (PBOR)
f) RESET Instruction
g) Stack Full Reset
h) Stack Underflow Reset
Most registers are unaffected by a Reset. Their status
is unknown on POR and unchanged by all other
Resets. The other registers are forced to a “Reset
state” on Power-on Reset, MCLR, WDT Reset, Brownout
Reset, MCLR Reset during Sleep and by the
RESET instruction.
Most registers are not affected by a WDT wake-up,
since this is viewed as the resumption of normal
operation. Status bits from the RCON register, RI, TO,
PD, POR and BOR, are set or cleared differently in
different Reset situations, as indicated in Table 3-2.
These bits are used in software to determine the nature
of the Reset. See Table 3-3 for a full description of the
Reset states of all registers.
A simplified block diagram of the On-Chip Reset Circuit
is shown in Figure 3-1.
The Enhanced MCU devices have a MCLR noise filter
in the MCLR Reset path. The filter will detect and
ignore small pulses. The MCLR pin is not driven low by
any internal Resets, including the WDT.
Looks like the most likely reasons (assuming of course that it is actually a reset, which it might not be) would be the stack over/underflow resets. Are you doing anything funny in assembly?
  #12   Spotlight this post!  
Unread 15-02-2004, 16:05
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Dangerous.....Code problem?!?

I cant remember what the joysticks do when nothing is connected - logically it must default to 0 or 254? Im sure it defaults to something, but to depend on that with a live machine online is a little risky.

Whenever we powerup our bot on the cart, or on the floor while we are messing with it, we always chock the wheels

and pull the fuse on the compressor with the pressure release valve open.

Last edited by KenWittlief : 15-02-2004 at 16:06. Reason: cause I cant type!!!
  #13   Spotlight this post!  
Unread 15-02-2004, 16:31
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,576
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: Dangerous.....Code problem?!?

Quote:
Originally Posted by KenWittlief
I cant remember what the joysticks do when nothing is connected - logically it must default to 0 or 254? Im sure it defaults to something, but to depend on that with a live machine online is a little risky.
They default to 127. It is covered in this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=24813
  #14   Spotlight this post!  
Unread 15-02-2004, 16:36
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Dangerous.....Code problem?!?

right the OI output defaults to 127 when it detects infinite impedance on the joystick input

but infinite impedance on an input makes it very susceptable to noise or glitches.
  #15   Spotlight this post!  
Unread 15-02-2004, 16:39
velocipenguin velocipenguin is offline
Registered User
#0246 (Overclocked)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Boston, MA
Posts: 77
velocipenguin is on a distinguished road
Send a message via AIM to velocipenguin
Re: Dangerous.....Code problem?!?

I'm not sure if the IFI initialization routines disable it or not, but the watchdog timer would reset the microcontroller after a certain amount of time, which could cause problems like those you're describing. If you want to make sure that's not the problem, read the 18F8520's datasheet to figure out how to disable the WDT, and toss the necessary assembler code into your program.
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
Autonomous problem. Code\\Pilot Programming 8 10-02-2004 19:40
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12
Code problem iBob Website Design/Showcase 3 17-01-2004 14:14
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
One final fairly massive problem with the code... authgeek1218 Programming 5 19-02-2003 16:51


All times are GMT -5. The time now is 05:32.

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