|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 ![]() |
|
#2
|
||||||
|
||||||
|
shouldn't comp_mode change?
Is that a typo, or does that bit really stay high all the time? |
|
#3
|
||||
|
||||
|
No, comp_mode does not change. I thought the same thing but Innovation first said no.
|
|
#4
|
||||
|
||||
|
Quote:
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
|
|||||
|
|||||
|
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...
|
|
#6
|
||||
|
||||
|
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 |
|
#7
|
|||||
|
|||||
|
So...basically robots will be on during standby period for operator interface... Judges will just have to police teams to not touch their controller...?
|
|
#8
|
||||||
|
||||||
|
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. |
|
#9
|
|||||
|
|||||
|
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. |
|
#10
|
||||||
|
||||||
|
Re: Re: My weird experience with comp_mode
Quote:
Last edited by Travis Hoffman : 23-01-2003 at 08:23. |
|
#11
|
|||||
|
|||||
|
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
|
|||
|
|||
|
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. |
|
#13
|
||||
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |