autonomous mode timer

What is going on when the robot is disabled exactly? I ask this because I have a timer running for my autonomous mode and I want it to start when the robot is activated and autonomous mode begins. I do not want the timer to start while the robot is disabled.
I’m sure this is a relatively elementary question, so hopefully this’ll have an easy answer.

Page 14 of the OI reference guide tells you exactly what all is still happening when the robot is disabled. The list includes - ‘execution of Pbasic code’, so if you had a basic timer it would most likely be counting while the robot is disabled. That is unless you test for the robot being enabled before the timer code:

 if comp_mode = 1 then  'comp_mode = 0 for disabled
'crucial timer code here
endif

*Originally posted by wwrye *
**

 if comp_mode = 1 then  'comp_mode = 0 for disabled
'crucial timer code here
endif
 **

:eek:

ThankYou ThankYou ThankYou

Elementary, maybe, but crucial…
Right now we’d have integrators winding themselves up, while we are waiting to go from disabled to activated

This is the “meat” of an e-mail that I got from IFI earlier this week…

Clarification of Competition Mode and Autonomous Mode
Game Phase
comp_mode
auton_mode

Before the Match
comp_mode = high (1) (Robot is Disabled)
auton_mode = low (0)

During Autonomous
comp_mode = low (0)
auton_mode = high (1) (Robot in Autonomous)

During User Control
comp_mode = low (0)
auton_mode = low (0)

After the Match
comp_mode = high (1) (Robot is Disabled)
auton_mode = low (0)

The Operator Interface will transmit joystick and button data at all times except during the 15 second Autonomous Phase. This means that Operator Interface controls can be used to select various Autonomous programs prior to the match start.

So, is the timer needed if the autonomous mode bit will be set/unset for the team during competition mode? If so then the party responsible for setting the bit so that it can be read by all RCs might also be responsible for unsetting after 15 seconds. Any ideas?:confused:

Both comp_mode and auton_mode will be set by the competition control system at the proper time to the proper state. That’s the point of having them :slight_smile:

the best way to find if your auton and comp modes works, make a few swiches connected to a game port (ie the one on the comp port on the transmitter) and play around. the pdf with the wiring scheme is at innovationfirst.com found here: http://www.innovationfirst.com/FIRSTRobotics/pdfs/Competition_Port_Pinout_Guide.PDF;

Hope this helps:); (thats for you ryan)

-Kesich