|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
|||||
|
|||||
|
'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
|
||||||
|
||||||
|
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. |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||||
|
|||||
|
Quote:
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) |
|
#6
|
|||||
|
|||||
|
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
|
||||
|
||||
|
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.
|
|
#8
|
|||||
|
|||||
|
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) [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
|
||||||
|
||||||
|
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." |
|
#10
|
|||||
|
|||||
|
Quote:
Matt |
|
#11
|
||||
|
||||
|
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.
|
|
#12
|
|||||
|
|||||
|
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
|
|||||
|
|||||
|
Quote:
|
|
#14
|
|||||
|
|||||
|
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. |
|
#15
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|