Go to Post It's not about taking risks, but more about identifying them (which is the hardest part) and reducing them. - Deke [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-03-2003, 18:50
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
Fried program slots?

We were doing some autonomous mode testing with our 2002 robot yesterday, and ran into some major problems with our robot controller. We were trying to make a multi-slot program, and when we did, the robot went berserk.

It started last weekend, when we were doing some other auto mode testing. Whenever we removed the program cable after downloading a program, all the motors and pneumatics started randomly turning on and off. Shutting off the bot fixed the problem.

Other than that, everything worked fine until we tried to change program slots. When we loaded our multi-slot auto program, and used our dongle to start auto mode, the robot went crazy for about three seconds, then died.

Subsequent testing showed that numerous program slots were corrupted, and would return bad data when we tried to use them. This got worse and worse with each test, until the RC finally refused to communicate with our laptop.

Does anyone have any idea what would cause these problems? All of our single-slot programs worked fine, but multi-slot programs caused problems every time.
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
  #2   Spotlight this post!  
Unread 15-03-2003, 19:21
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
More detail...

I'm on Jeff's team, and wanted to add a little bit of detail I feel relevant.

Before we started having multi-slot programming, we did have a few problems.

- When we tried to upload a program, the BASIC stamp would sometimes refuse to communicate. We had loopback and echo from the program port, but it would not give in ID or accept a program. When we unplugged after this happened, all the motors and relays went completely random.

- Occaisonally, the p1_y axis, which should be linked with our drive system, took the place of p3_y, which controlled an arm. Input from p3_y was ignored. This was corrected by resetting the robot.

- Once or twice, I heard / saw one of the arm actuators randomly move, even when the robot was in disable.

After attempting to load a multi-bank program, it ran until the RUN statement and then stopped. We had made a bunch of different autonomous programs, and we were trying to load each of them into their own bank and then use the selector switch to run them. Code looked something like this:

if auton_mode = 1 then
if (Prog = 1) AND (Side = 1) then RUN 1
if (Prog = 1) AND (Side = 0) then RUN 2
if (Prog = 2) AND (Side = ....
endif

'Code to get the input from the OI while in disable

I know that the correct RUN command was being executed through output provided by DEBUG statements.

Later, I wrote a program that looked like this:

a.bsx (slot 0)
DEBUG "a"
RUN 1

b.bsx (slot 1)
DEBUG "b"
RUN 2

c.bsx (slot 2)
DEBUG "c"

It ran fine on an older bot (2000), but on our 2001 bot all it outputted "abc" the first time, but if I did the reset button it outputted a plus-or-minus sign, than a superscript 2 followed by a superscript 3. Turning the RC off for a minute and turning it back on would yield "abc" the first time, and then would result in plus-minus to the 23 when we pressed the reset button.

Also, I noticed that sometimes I would have to download the program into the computer multiple times. WIth a 3 bank program (0-2) slots 0 and 2 would go to 100%, but 1 would remain at 0% on the download status screen.

One thought that I have (Jeff doesn't agree) is that we noticed that our battery voltage was 13.8V coming into the RC. Is it possible that the RC is overclocked? The warning level on my computer for a 12V current is 8% off, and we're running about twice that.

One reason I'm inclined to think that it may be overclocked is that all of the problems we're having can be linked to memory corruption. When one overclocks a computer or runs the voltage a bit hot, the first thing to go wrong is usually for the computer to give "Access violation" errors, where the computer goes looking for RAM that it doesn't have, or can't reliably access that RAM. If anyone has eer seen a poorly overclocked video card, while playing games it tends to flicker and the textures are corrupted since the address the game asked for wasn't the address it got.

On Monday, I plan to take a poorly charged battery and hook it up to see if we get the same errors.

Does anyone have any ideas? Does the overclocking theory sound reasonable? If so, what can we do about it?
  #3   Spotlight this post!  
Unread 15-03-2003, 19:22
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
umm.. remember, you still have to have serin's/serouts in multi-slot proggies.. which means declare your varibles and etc.

basically.. each different file in each slot has to have its own varibles and serin's and serouts and etc. of course you probably did this.. but who knows?
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net
  #4   Spotlight this post!  
Unread 15-03-2003, 19:26
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
lol.. that message wasn't there when i posted.. oh well.. ignore me
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net
  #5   Spotlight this post!  
Unread 15-03-2003, 19:26
Alex1072 Alex1072 is offline
Registered User
AKA: Alex
#1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: San Jose
Posts: 110
Alex1072 is an unknown quantity at this point
Send a message via AIM to Alex1072 Send a message via Yahoo to Alex1072
We were having issues with our robot going berserk too, but we wern't using multi slot programs. Make sure you never output 255 to a PWM. It makes the robot go crazy, and some very odd (and hard to trace) things start happening. IE. We outputed 0 to both relay banks. If the PWM output was set to 255, the relays would randomly turn on anyways.
  #6   Spotlight this post!  
Unread 16-03-2003, 20:01
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
If you look at the test code (the a-, b-, c-, .bsx) you can see that it program has nothing to do with serin's, serout's, or variables.

We did have all of our variables, ser-ins and ser-outs present. All of the programs could have been loaded into slot 0 and they ran fine.
  #7   Spotlight this post!  
Unread 17-03-2003, 13:37
ttedrow's Avatar
ttedrow ttedrow is offline
Herding electrons
AKA: Tim Tedrow
FRC #0281 (EnTech)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Greenville, SC
Posts: 165
ttedrow will become famous soon enoughttedrow will become famous soon enough
One question. Have you upgraded the RC and OI? This would be required to do autonomous mode on last years equipment.

Tim Tedrow
__________________
Sr. Design Engineer
Caterpillar Inc.
Greenville, SC

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #8   Spotlight this post!  
Unread 18-03-2003, 09:07
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
What do you mean by upgrading it?

Anyways, we tested the same program on the 2001 RC, and had no problems. I'm thinking that there was some sort of hardware fault with our 2002 RC.
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
  #9   Spotlight this post!  
Unread 18-03-2003, 09:32
ttedrow's Avatar
ttedrow ttedrow is offline
Herding electrons
AKA: Tim Tedrow
FRC #0281 (EnTech)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Greenville, SC
Posts: 165
ttedrow will become famous soon enoughttedrow will become famous soon enough
Last years RC and OI do not have autonomous mode operation capability. Do not use the three switch dongle on last years controller. Check out the Innovation First WEB site for upgrade information.

Tim Tedrow
__________________
Sr. Design Engineer
Caterpillar Inc.
Greenville, SC

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #10   Spotlight this post!  
Unread 18-03-2003, 13:11
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
Really? Where is this information? I've never seen that anywhere. I was under the impression that Auto mode was just a software thing (PB bit mode 6, or something like that).
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
  #11   Spotlight this post!  
Unread 18-03-2003, 14:25
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
The official Innovation FIRST answer is that the 2003 controller supports autonomous, and if you get the 2002 controller upgraded, it will also support autonomous. But through the course of our testing we used old robot controllers and were surprised to see that they worked in autonomous mode. IFI may have modified the firmware somehow, but the old controllers certainly run autonomous code. As Jeff said, the auton_mode flag is just a bit in PB_mode and that bit is set correctly in older controllers.

Just be warned that since autonomous isn't officially supported in older controllers, you may see unexpected behavior.
  #12   Spotlight this post!  
Unread 19-03-2003, 08:53
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
Thanks for the clarification, Mike. That was what I was thinking. I'm thinking the problems were some sort of hardware fault, though. We had problems with that same control system at Nats last year, and this may be part of the same defect.
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
  #13   Spotlight this post!  
Unread 19-03-2003, 10:54
Sachiel7's Avatar
Sachiel7 Sachiel7 is offline
<Yes I managed to flip it
AKA: Shayne Helms
FRC #1132 (RAPTAR Robotics)
 
Join Date: Sep 2002
Rookie Year: 2002
Location: Richmond, VA
Posts: 541
Sachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really nice
Send a message via AIM to Sachiel7
Multi-Slot Problems

Yeah, Sachiel7 from 1132 here.
I just got the info for Multi-Slot Proggin' yesterday.
I've been trying a few things, but I seem to have a few problems:

1) Here's My Slot Layout:

0: Init
1: Main
2: Auto1
3: Auto2
4: Auto3
5: Auto4
6: Auto5
7: Auto6

Ok, Init and Main routines work fine until... Auto!
It seems that I have come to 2 conclusions:
1: The Run statements aren't working properly
2: The Autonomous trigger isn't working properly

We have a 2 switch dongle, w/ disable and Auto.
I'm not sure what the problem is, but if anyone can help, please let me know!
__________________
-=Sachiel7=-

There's no such thing as being too simple!
Look for Team #1132, RAPTAR Robotics at the VCU Regional this year!
  #14   Spotlight this post!  
Unread 19-03-2003, 12:12
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Any chance that you didn't have the exact same variable declarations in all of the slots. Remeber that you don't have a separate 26 variables in each slot they are all the same, if they are declared at all differently in any of the slots, the same section in memory may show up as something different as you go from slot to slot. For example if one slot had this

p1_x VAR byte 'Port 1, X-axis on Joystick
'p2_x VAR byte 'Port 2, X-axis on Joystick UNUSED
'p3_x VAR byte 'Port 3, X-axis on Joystick UNUSED
'p4_x VAR byte 'Port 4, X-axis on Joystick UNUSED

p1_y VAR byte 'Port 1, Y-axis on Joystick
'p2_y VAR byte 'Port 2, Y-axis on Joystick UNUSED
p3_y VAR byte 'Port 3, Y-axis on Joystick UNUSED
'p4_y VAR byte 'Port 4, Y-axis on Joystick UNUSED

And another slot had this
p1_x VAR byte 'Port 1, X-axis on Joystick
p2_x VAR byte 'Port 2, X-axis on Joystick
'p3_x VAR byte 'Port 3, X-axis on Joystick UNUSED
'p4_x VAR byte 'Port 4, X-axis on Joystick UNUSED

p1_y VAR byte 'Port 1, Y-axis on Joystick
'p2_y VAR byte 'Port 2, Y-axis on Joystick UNUSED
p3_y VAR byte 'Port 3, Y-axis on Joystick UNUSED
'p4_y VAR byte 'Port 4, Y-axis on Joystick UNUSED

In memory p2_x would have the same location as p1_y in the first slot. Try it, it might suprise you!

We take the entire memory declaration section and copy it exactly to each slot so this can't happen. We have never had any problems with any controllers and multiple slots.

I can post more info if anyone doesn't get what I am saying.
  #15   Spotlight this post!  
Unread 19-03-2003, 12:43
Jeff Waegelin's Avatar
Jeff Waegelin Jeff Waegelin is offline
El Jefe de 148
AKA: Midwest Refugee
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 2001
Location: Greenville, TX
Posts: 3,132
Jeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond reputeJeff Waegelin has a reputation beyond repute
What Matt said is very important. One of the problems we rean into was with delta_t. It was being defined in the same spot os one of our analog sensors, and so instead of sending 0 if it didn't miss a packet, it sent 127. Not good. Variable declaration orderr is absolutely crucial.

One question, though: does the master uP init code need to be in just slot 0, or in all slots?
__________________
Jeff Waegelin
Mechanical Engineer, Innovation First Labs
Lead Engineer, Team 148 - The Robowranglers
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
2-week FIRST summer program @ WPI ColleenShaver General Forum 20 31-05-2009 03:02
initialization program and speed controllers rosebud Programming 15 05-10-2004 03:35
The best fundraising program ever... Petey Fundraising 2 12-09-2003 19:42
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
Credits for FIRST program. archiver 2000 6 24-06-2002 00:16


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

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