Go to Post ... as teammates we often get too into the craze of competition and forget that this wouldn't happen without so many dedicated people. - miketwalker [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 21-01-2003, 14: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
Competition Sequence for PBasic

I talked with Innovation first on 1/21/02. Here is my understanding of the sequence that the PBasic program can see during each phase of competition.



STANDBY PERIOD: (power on RC and OI)
comp_mode = High
auton_mode = Low
Robot Controller Analog Outputs = 127
Robot Controller Digital Outputs = 0
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

AUTONOMOUS PERIOD:
comp_mode = High
auton_mode = High
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

OPERATOR PERIOD:
comp_mode = High
auton_mode = Low
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = Operator Control
Operator Interface Digital Inputs = Operator Control

I hope this will help

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

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #2   Spotlight this post!  
Unread 21-01-2003, 14:42
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,605
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
shouldn't comp_mode change?

Is that a typo, or does that bit really stay high all the time?
  #3   Spotlight this post!  
Unread 21-01-2003, 15:53
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
No, comp_mode does not change. I thought the same thing but Innovation first said no.
__________________
Sr. Design Engineer
Caterpillar Inc.
Greenville, SC

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #4   Spotlight this post!  
Unread 22-01-2003, 16:46
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
Quote:
Originally posted by ttedrow
No, comp_mode does not change. I thought the same thing but Innovation first said no.
IF the comp_mode bit does not change, how can FIRST keep our bots disabled before the match starts? What is the difference between "standby period" and "operator period" with respect to control signals? How can comp_mode = high and auton_mode = low produce two different behaviors for the inputs & outputs?

In previous years during the standby period, the RC would execute its code without knowing that its outputs were being set to 127 & 0 by the output processor (unless of course you looked at the comp_mode bit). All the inputs were passed from the OI & RC to your program. There has been no official word from FIRST or IFI that anything will be different this year.
  #5   Spotlight this post!  
Unread 22-01-2003, 17:37
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
I agree that something doesn't sound right about this...can someone verify with a 2003 control system and a disable/auton dongle? Not being on a team this year, I have no way of doing this myself...
__________________
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...
  #6   Spotlight this post!  
Unread 22-01-2003, 21:49
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
According to Innovation First, the comp_mode bit is only an indication that the OI is plugged into competition system. They also told me that there is no bit available to PBasic that indicates the start and end of the match. Maybe next year if requested.

I have verified this with the new dongle.

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

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
  #7   Spotlight this post!  
Unread 22-01-2003, 21:55
Specialagentjim's Avatar
Specialagentjim Specialagentjim is offline
"I am a Meat Popsicle"
AKA: Jim Martz
None #0108 (SigmaC@T)
Team Role: Alumni
 
Join Date: Mar 2002
Rookie Year: 2000
Location: Ft. Lauderdale / Parkland
Posts: 645
Specialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to beholdSpecialagentjim is a splendid one to behold
Send a message via AIM to Specialagentjim
So...basically robots will be on during standby period for operator interface... Judges will just have to police teams to not touch their controller...?
__________________


Curie Division 2005 Champions (175, 33, 108)
UCF 2005 Website Award
Midwest 2005 Delphi's Driving Tomorrow's Technology

2004 UCF QuarterFinalists (1065, 86, 108)

UCF 2003 Regional Champs/Entrepreneurship Award
Midwest Regional 2003 Leadership In Controls/Website award
Nationals 2003 Quarter Finalists
Robot Rodeo 2003 Champions (Alliance: 180 and 186)



AIM S/N: Specialagentjim
  #8   Spotlight this post!  
Unread 22-01-2003, 23:38
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
My weird experience with comp_mode

Here's a line of code that has been in Xtremachen's control program for as long as I've been a programmer on the team:

rotatinglight = 1 - comp_mode

Our light has always worked properly - it's been on when the robot was enabled and off when it was disabled. This is the case during matches and also when using the homemade Competition Port dongle. For us, comp_mode has always been equal to ZERO when the robot has been enabled.

http://www.innovationfirst.com/FIRST...nout_Guide.PDF

Here's why I think comp_mode = 0 during a match. I might be completely wrong - it wouldn't be the first time.

According to the official Competition Port pinout, you must connect Ground Pin 8 to Disable Pin 6 in order to DISABLE the robot. This is the same thing you do to turn a digital input on - completing the circuit between ground and the input pin yields a logical 1 inside the program. If the Competition Port inputs follow the same pattern, then the comp_mode input turns ON when you close the circuit (robot disabled) and OFF when you open the circuit (robot enabled). If this is all true, then comp_mode = 0 during a match.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #9   Spotlight this post!  
Unread 23-01-2003, 01:44
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: My weird experience with comp_mode

I think I remember confirming that comp_mode is 0 when the robot is enabled. I don't remember whether I confirmed that it changes when the robot is disabled though.

BTW, the fact that your light turns off when the robot is disabled doesn't mean comp_mode changes. All it means is that the master microprocessor in the RC knows when it's supposed to disable the robot, and it does.

In any case, it would be nice if IFI would correct the comments in the default code regarding comp_mode.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #10   Spotlight this post!  
Unread 23-01-2003, 08:14
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Re: My weird experience with comp_mode

Quote:
Originally posted by gwross
BTW, the fact that your light turns off when the robot is disabled doesn't mean comp_mode changes. All it means is that the master microprocessor in the RC knows when it's supposed to disable the robot, and it does.
My point wasn't that comp_mode changes, it was that comp_mode was equal to ZERO during a match - it had to be; otherwise, our rotating light wouldn't be on. I am guessing, however, is that comp_mode acts like a digital input variable in the sense that it is 1 when the disable switch is closed and 0 when it is open. That would have to be verified (ultimately, by IFI, I hope).
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner

Last edited by Travis Hoffman : 23-01-2003 at 08:23.
  #11   Spotlight this post!  
Unread 23-01-2003, 08:23
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
As of last year, the comp_mode bit was zero while disabled and one when enabled. I know this because we used it last year to autodrop our goal grabbers at the start of the match. That means that it's worked in the past. Now, that's not to say that InnovationFIRST hasn't changed something. However, the documentation in the default program seems to indicate that the comp_mode bit still keeps it's old behavior.

Matt
  #12   Spotlight this post!  
Unread 23-01-2003, 08:46
Ryan Meador Ryan Meador is offline
Registered User
#0190
Team Role: Electrical
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Worcester, NH
Posts: 68
Ryan Meador will become famous soon enough
Check this out.

From the Default Program:
' Bit 7 of the PB_mode byte (aliased as comp_mode below) indicates the status
' of the Competition Control, either Enabled or Disabled. This indicates the
' starting and stopping of rounds at the competitions.
' Comp_mode is indicated by a solid "Disabled" LED on the Operator Interface.
' Comp_mode = 1 for Enabled, 0 for Disabled.

From the Programming Reference Guide:
Bit 7 of the PB_mode byte (aliased as comp_mode below) indicates the status of the Competition
Control, either Enabled or Disabled. This indicates the starting and stopping of rounds at the
competitions. Comp_mode is indicated by a solid "Disabled" LED on the Operator Interface.
Comp_mode = 1 for Enabled, 0 for Disabled.

Now, to the best of my knowledge, IFI created the programming guide for this year's controller. So one would think that it's correct. It also is exactly the same as the comments in the code, and if you look at how it claims the LEDs will behave, they do exactly that. All that remains to be tested is whether or not the bit actually changes... I suspect it does.

I have a vague memory of another bit that was aliased as disabled_mode or something similar from years ago. Maybe it was just our programming coach changing the name. Now that I'm the programming coach, everything has new names None of this PWM1 garbage... it's LeftFrontDrive.
__________________
-Ryan

"You're not a real programmer until you end all your sentences with semicolons;"
  #13   Spotlight this post!  
Unread 23-01-2003, 08:49
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
Ok Ok Ok!!! I had the comp_bit inverted. But the fact is the comp_mode bit does not change during the competition.

STANDBY PERIOD: (power on RC and OI)
comp_mode = Low
auton_mode = Low
Robot Controller Analog Outputs = 127
Robot Controller Digital Outputs = 0
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

AUTONOMOUS PERIOD:
comp_mode = Low
auton_mode = High
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

OPERATOR PERIOD:
comp_mode = Low
auton_mode = Low
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = Operator Control
Operator Interface Digital Inputs = Operator Control

Sorry for the confusion

BTW

rotatinglight = 1 - comp_mode
AND
rotatinglight = 1

do the same thing.

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

KD4EGM

FRC 281 Greenvillains
Infected with the FIRST virus in 2000

Yes, Chute Door!!!
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
Looking from a different point at "Fixing" punarhero General Forum 27 18-03-2003 18:41
SCRRF 2/16/03 Sectional Competition Redhead Jokes Southern California Regional Robotics Forum 0 26-01-2003 01:33
How well did the regional competition help preparing? archiver 2001 3 24-06-2002 02:33
The site of the competition archiver 1999 8 23-06-2002 22:41


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

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