![]() |
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 :confused: .
|
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.
|
Re: Dangerous.....Code problem?!?
Quote:
|
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 ).
|
Re: Dangerous.....Code problem?!?
Maybe something screwy happened in the code maybe?
|
Re: Dangerous.....Code problem?!?
The simple answer is to put the robot on blocks until you've debugged the control system.
|
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.
|
Re: Dangerous.....Code problem?!?
Quote:
|
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 |
Re: Dangerous.....Code problem?!?
Quote:
|
Re: Dangerous.....Code problem?!?
From the chip docs:
Quote:
|
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. |
Re: Dangerous.....Code problem?!?
Quote:
|
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. |
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.
|
| All times are GMT -5. The time now is 20:15. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi