Go to Post If you don't manage weight from the beginning, weight will manage you at the end. - charrisTTI [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 01-07-2002, 11:15
punarhero's Avatar
punarhero punarhero is offline
Registered User
#0696 (Clark Magnet Robotics)
Team Role: Programmer
 
Join Date: Jan 2002
Location: la crescenta
Posts: 67
punarhero is an unknown quantity at this point
Send a message via AIM to punarhero Send a message via Yahoo to punarhero
Operator Interface is crazee !!! HELP

Hi,
I have two questions. First of all, if u press "robot reset" on the Operator Interface, does it just refreshes the program in the robot Controller or changes the program on the Robot Controller back to the default program???

Secondly, we went to the SCRRF summer event last Saturday. We ran the robot and it was running fine. When we started competing, it started giving BASIC error for some reason. I press reset couple of time and then it worked fine. Any ideas of what kind of problem might it be? Hardware or programming problem?

HELP ME !!!

Punar Sikka
Team 696
Clark Magnet Robotics
VIPER
  #2   Spotlight this post!  
Unread 01-07-2002, 11:42
srawls's Avatar
srawls srawls is offline
Registered User
#0122 (Nasa Knights)
 
Join Date: Dec 2001
Location: Yorktown
Posts: 507
srawls is an unknown quantity at this point
Send a message via AIM to srawls
'robot reset' will reboot the robot controller, meaning the program will start over with all vars initialized again (but the default code does not start up unless that's what you're running anyway). BASIC error usually means something with the program, like an infinite loop or something, but if it went away with just hitting reset it could be that there was a loose connection somewhere, or it was just a wierd bug. I'd really have to 'play around'/test your 'bot out before I could say for sure. Maybe someone with more experience than me will know, though ...

Stephen
  #3   Spotlight this post!  
Unread 01-07-2002, 12:17
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Basic errors can also be caused if you give invalid input to a command. For example, if you try to do a "put" to location 63, I believe it will give you a basic run error b/c this location is read-only. I've only ever seen basic run errors be a software thing, so if you want to post your code, I'd be happy to take a look.

Pushing the "robot reset" does the same thing that turning the robot off then back on again would do. It's just a quick, remotely-accessible way of doing it.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #4   Spotlight this post!  
Unread 01-07-2002, 12:26
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
scrawls is right about both, but a little more insight on the basic error.

if your program is flawed, but syntax is correct, you'll get a basic error.

if your program can become flawed if a certain condition is met (like an if statement not normal met becomes true, and leads to bad code).

i believe if the battery voltage drops to low, you will get a basic error which effectivly shuts the robot off so it doesn't go crazy and kill people (and yes, the uP will screw up if there's not enough power).

if there was any problem in downloading the code (from computer to RC), it may give you an error.

i'm sure there's plenty of other ways to get errors, but these are ones i know off the top of my head.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #5   Spotlight this post!  
Unread 01-07-2002, 12:53
ChrisA's Avatar
ChrisA ChrisA is offline
Registered User
#0857 (Superior Roboworks)
Team Role: College Student
 
Join Date: Feb 2002
Location: Michigan Tech
Posts: 157
ChrisA is on a distinguished road
Send a message via AIM to ChrisA
Quote:
Originally posted by srawls
'robot reset' will reboot the robot controller, meaning the program will start over with all vars initialized again (but the default code does not start up unless that's what you're running anyway).
thought id just clarify this....
robot reset does not initialize the vars unless the vars are initialized in the code. all previous vars stored in ram are still there until the ram is cleared.

whatever program was downloaded to the robot is the code that it has stored in eeprom. the eeprom is not changed unless u either write something to eeprom in the code or you download new code to the robot controller.

also my team has found that you can get basic run errors from most anything. if you get a basic run error here are some steps to try to clear it:
1. regular old robot reset from the operator interface (usually works)
2. reset robot from the robot controller (basically same as controller but sometimes works when oi doesnt
3. turn off robot for about 15 seconds or so then turn back on (this will clear the ram in the robot controller)
4. check through your code to see if there is something wrong. if you cant find anything wrong try an older code and see if that works. if it works then there is definitely something wrong with ur new code.
5. redownload the code to the robot controller (if its fine then maybe there was an error with the download)
__________________
Programmer
----------------
Team#857
Superior Roboworks

WildStang Alum
  #6   Spotlight this post!  
Unread 01-07-2002, 13:53
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
First of all, when the battery voltage drops too low (I want to say below 7 volts but don't quote me on it), the robot controller resets itself (it doesn't have enough voltage to maintain itself on, so it turns off, dropping the load on the battery, which means that there's enough voltage to power the robot controller so it restarts).

As far as the basic run errors, it's almost definately a code problem. It can be caused by an infinite loop. It can also be caused by doing something illegal in the code. I also believe if you SerIn more or less data than you should or Serout the wrong amount, you'll get a Basic Run Error.

Matt
  #7   Spotlight this post!  
Unread 01-07-2002, 14:11
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Matt, doesn't the uP take an almost insignificant amount of power? When compared to a motor, a bunch of transistors can't take more power. And i think once the voltage drops below 9 volts, you get the low battery warning, and you start having some unexplained errors (the uP is slowly dieing). once it drops below 8 volts, i think it gives a basic error, which has the effect of shutting down the robot, cause once a basic error occurs, you must reset or power cycle.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #8   Spotlight this post!  
Unread 01-07-2002, 14:17
srawls's Avatar
srawls srawls is offline
Registered User
#0122 (Nasa Knights)
 
Join Date: Dec 2001
Location: Yorktown
Posts: 507
srawls is an unknown quantity at this point
Send a message via AIM to srawls
Just to clear things up, if you drop below 9 volts in the default program then the low battery light will blink. You can always change the constant dataInitVolt to set the voltage you want the light to start blinking on. From the default code, here's the equation:
Code:
VOLTAGE = INT ((DESIRED FLASH VOLTAGE + 0.4) * 16.3)
Stephen

[edit]
PS. this is also from the default code:

If you see a BASIC INIT ERR on the Robot Controller after programming and pressing RESET, then there is a problem with the Serin command

[/edit]

Last edited by srawls : 01-07-2002 at 14:24.
  #9   Spotlight this post!  
Unread 01-07-2002, 15:16
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Direct from innovationFIRST's documentation:

"If after programming and reseting the Robot Controller, the BASIC RUN ERR light is ON, then the basic code has no output. This means that the code is not running properly. Check for errors in the code. The BASIC RUN ERR light is controlled by the Output microprocessor."
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #10   Spotlight this post!  
Unread 01-07-2002, 15:38
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Quote:
Originally posted by Ian W.
Matt, doesn't the uP take an almost insignificant amount of power? When compared to a motor, a bunch of transistors can't take more power. And i think once the voltage drops below 9 volts, you get the low battery warning, and you start having some unexplained errors (the uP is slowly dieing). once it drops below 8 volts, i think it gives a basic error, which has the effect of shutting down the robot, cause once a basic error occurs, you must reset or power cycle.
The RC most definately does not shut itself down when voltage drops below 8 volts (I suppose my 7 was wrong; I was giving that number off the top of my head). While the RC doesn't use very much power directly, it does however control the power used by the motors. These motors in turn put a large load on the battery. When the RC cuts out because of lack of voltage (and it needs a certain voltage to continue functioning), the control signals to the speed controllers and spikes stop, thereby causing the motors to stop. There then is a significant decrease in load on the battery allowing the RC to start because the voltage has come back up. You'll sometimes see teams with their lights going on and off (it frequently will die any time they try and move because the battery can't support the load of the motors); this is generally caused by a too low battery.

Matt
  #11   Spotlight this post!  
Unread 01-07-2002, 15:53
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
oh, i thought you were talking soely about the RC, not an entire robot. but, once the voltage drops too low (like 8 volts), i think that the RC will shut itself off, or a basic run error will occur, and the robot will die. this is to protect it from going crazy, because if there isn't enough voltage, the RC cannont function, and it's designed to stop functioning completely when it reaches that threshold.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #12   Spotlight this post!  
Unread 01-07-2002, 16:04
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
It's not so much designed to as has to. It's inherent in a digital electronics circuit. You don't have enough voltage to power it and nothing works. It most definately does shut off because of the lack of power as I've seen it happen numerous times.

Matt
  #13   Spotlight this post!  
Unread 01-07-2002, 16:08
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Quote:
Originally posted by Matt Leese
It's not so much designed to as has to. It's inherent in a digital electronics circuit. You don't have enough voltage to power it and nothing works. It most definately does shut off because of the lack of power as I've seen it happen numerous times.

Matt
Exactly...the minimum voltage that the RC can run at is 8.0...as soon as your voltage drops below that, it's going to shut down until the voltage comes back up...
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #14   Spotlight this post!  
Unread 02-07-2002, 00:54
ChrisA's Avatar
ChrisA ChrisA is offline
Registered User
#0857 (Superior Roboworks)
Team Role: College Student
 
Join Date: Feb 2002
Location: Michigan Tech
Posts: 157
ChrisA is on a distinguished road
Send a message via AIM to ChrisA
Exclamation

ok let me clearify something for you all...
this is about the only thing i learned about the robots electronics while programming
8 is correct number for the voltage that the robot controller will stop 'working'
the problem with this statement though is that its not the robot controller that stops working... its the radio controller (ur saying rc but that can stand for robot controller or radio controller so i dont know which ur talking bout) that stops working... when voltage drops below 8 volts the radio controller will lose signal... when the robot controller sees this it will tell you that there is no signal. not sure exactly why you guys bring this up... from what i remember the basic run error will not come on at this point (most likely anyways) you should instead see the no data/radio signal light on. if you do have a problem with power just let me know if i can help... my team has 6 electrical guys which can answer any questions you might have on the electrical workings of the robot controller.
__________________
Programmer
----------------
Team#857
Superior Roboworks

WildStang Alum
  #15   Spotlight this post!  
Unread 02-07-2002, 12:06
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
hmm, i thought when the voltage dropped too low, the robot controller (that's what i meant by RC) recognizes that the battery is dead for the purposes that we use them for. sure, the voltage will pop back up, but any drain on the battery will bring it down again. so, i thought that it was programmed to turn off after the voltage drops too low. i know i saw a red light, so it may have been the data signal, but i can't remember now.

also, i'm pretty sure i've seen the low battery light stay solid, even when the voltage is in 10, because it drop down to like 9.1 then went back up. so at least the RC knows when the battery is dieing. and i didn't change that section of the code at all, so that's not it.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
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


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

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