[OCCRA]: VEX Programming

We would like to address this question to Mr. Mark Center regarding VEX programming.

I have had a lot of problems with the new vex program template and have a few questions. When I try and use the template supplied on Chief Delphi, it skips autonomous mode and goes straight to user control, in addition I am wondering if I can use a while loop within the functions, or will that affect the time argument specified in the function parameters. Also,one last question, if i program a return from one of the two functions, Autonomous or User control, even though they are void functions, will it it end the function and just go back to void main, or will it crash the program.

Please look at the examples I have posted in the OCCRA programming forum. Pay close attention to the example I provided for the Royal Ravens team.

You must use a while loop inside of the autonomous program, otherwise it operates just once. I found that out myself by playing with the program at home. It does not alter the time of the autonomous period (15 seconds).

Dear OLSM,
Ok, Here is a sample program, same as RO ravens program with the name modified for you so Chief Delphi website would allow me to upload.

  1. Autonomous operation requires you to wire a start button to input 5.

  2. To activate autonomous, turn on VEX transmitter, then hit Start Switch.

  3. Go to the terminal window. You should see print statements that show
    the various steps through the autonomous operation.

  4. A tank block has been placed in the autonomous period. Note that it does
    not work with your remote controls as expected.

  5. A tank block has been also placed in the operator controlled period. Note
    that it does work if your motors are wired to Motor1 and Motor 2 outputs.

  6. Oh yeah, my name Marc is spelled with a c not a k - for next time.

  7. Don’t know about what problems you will have with return statements. You will need to experiment. Place print statements in all paths to help you debug operation. Once you figure out how it works, remove the print statements, they take about 10 milliseconds each and are time intensive.

  8. Go OCCRA Teams!