competiion template empty functions

When I open up any of the templates in easy C version, I see 2 function s (Autonomous(time) and OperatorControl(time)). When I look at those functions, they are empty. How does the controller or program know what to do with the time parameter?
Am I supposed to create a timer_fuction() that gets called in each?
WHat am I missing?

Each of the two functions has a parameter like (20) after each function. This designates the time allocated for that function. Turn on the robot controller, nothing should happen, turn on the transmitter and the autonomous function will execute for the time defined by the parameter of the function - (20) means 20 seconds. After this time is up, the Operator control period will follow it and last for the amount of seconds defined. Competition templates are completely defined in easyC’s help file and are used in some of the tutorials included in the easyC help file. Hope this helps!

Thanks for the reply. However, my question remains.
Normally when you call a function (such as Autonomous(20)), there is a corresponding function definition. IN this case it is:
Autonomous(unsigned long ulTime)

There should be some code in the function. There isn’t.
I do not find any further help in the template’s “project” tab that includes all of the *.c and &.h files.

THere must be something I do not know about the controller code. BUt somewhere there should be a real Autonomous function with code in it.

Larry STemke

The software has a timer running in the background you do not need to create a timer. Just create a autonomous program under the autonomous function and operator control program under the operator control function and it will work. If you need help see getting started in the help file.

The functions are blank because that is where your code goes for both autonomous and operator control.

OK. I will not ask about the “empty” functions anymore. On a higher level, the template works as you have described.

My next question is why does the autonomous routine have a 20 second parameter (as expected) and the OperatorControl routine have a 254 second parameter (expected 120)? THe name of the template is “EasyC Autonomous Template 20-120.ECT” so I thought the 2nd parameter would be 120.
My guess is that the parameter should be >= 120 so that the competition can control when the power goes off and everything stops.

Is this the correct template for the Bridge Battle currently going on?


The correct template for Bridge Battle is located at Click on the competitions link and you will see a link for Bridge Battle.

The operator control run time is longer than the match time because, after autonomous the field may remain disabled for a extended period of time while the score is computed. Unfortunately, the VEX hardware doesn’t have the same level of field control as it’s FRC counterpart.

I did not find a template at that location. The zip file that said it was a sample template uncompressed into: Sample_Competition_Template_Program.[ECP BDS]. Not a *.ECT.

However, the sample had the 20 sec autonomous mode and 254 second Operator control period. Is it OK to use the template I mentioned previously that has the same time periods? Or is there something I do not see that is different?

Larry Stemke

You can use any template as long as the Autonomous is 20 and Operator is 254.

OK. At the competition, we found out that the Operator Control function did not automatically follow the end of the Autonomous function. I put a print statement at the very end of the Autonomous function, which printed and proved that we got to the end of Autonomous in less than 20 seconds. But it did not proceed and give us Operator COntrol.
We could get Operator control by putting a jumper in interrupt 6 and we could run the Autonomous only with a jumper in interrupt 5. But when we removed both jumpers, it only executed Autonomous.
THankfully, those running the competition let us put in jumper 6 in-between the 2 parts of a game.
We seemd to be the only one with the problem and nobody at the show could help us, although they tried.

Please verify that you are using Master code V7 for easyC. You can reload the master code from the loader/terminal window under the Options menu. Even if you have the correct version now, I would reload it and see if you that helps. Sometimes the master code gets corrupted.

If this does not work, try downloading the code to another Vex controller and see if you have the same issue. Hope this helps.