Programming instructions

Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Troubleshooting ROBOTC with Cortex 7
Troubleshooting ROBOTC with Cortex
4.ChecktheROBOTCErrorswindowforhints.
• TheROBOTCErrorswindow(usuallylocatedatthebottomofthescreen)willdisplay
• alistofknownerrors,whatlinethey’reon,andsomeinformationabouttheerror.
• Double-clickerrorsintheROBOTCErrorswindowtohighlighttheaffectedlineinyour
• program.
• Correcterrors(keepinmindyellowx’sareonlywarnings,andwhitex’sareonlyinformation,
• noterrors).
• GotoRobot>CompileProgramtorecompileyourcode.
5.Compareyourcodetoprogramsyouknowworkandcompile.
• CompareyourcodetsimilarROBOTCSamplePrograms(File>OpenSampleProgram)
Problem:Programcompiles,butdoesnotbehaveasdesired
1.Compareyourcodetoprogramsyouknowworkandcompile.
• CompareyourcodetsimilarROBOTCSamplePrograms(File>OpenSampleProgram)
2.Think“liketherobot”.Therobotdoesexactlywhatyoutellittodo.Nothingmoreandnothingless.
• Isthereanimportantstepyou’reforgettingtotelltherobot?
• Gobacktoyourpseudocodeplan.Doesthesequenceofstepsmakesensefortherobot?
3.UsetheROBOTCProgramDebugwindowto“Step”throughyourcodeline-by-line.
• Downloadtheprogramtotherobot.
• WhentheProgramDebugwindowappears,repeatedlypressthe“Step”buttontoruntheprogramline-by-
line.
• Observetherobot’sbehavior.Howdoesitcomparetothedesiredbehavior?
• Trytoidentifywheretherobot’sbehaviordiffersfromthedesiredbehavior.
4.Insertvisual“ags”inyourprogram.
• InsertoptionalwaitstatementsorturnondifferentLED’satdifferentpartsoftheprogram.
• WhentherobotreachesoneofthewaitstatementsorLED’s,andbehavedcorrectly,youknowthatthe
programwascorrectupuntilthatpoint.
• Continuetoinsertandobservetheseoptionalagsuntilyouidentifytheproblem.
Problem: Not able to open the ROBOTC Debugger
1.WasthecorrectstartupsequencefollowedwhenconnectingtheCortextothecomputer?
• StartwiththeCortexTurnedOFF
• ConnecttheCortextothecomputeroverUSB
• TurntheCortexOn
• Retrydownloadingtheprogramtoopenthedebugger
2.HastheprogrambeendownloadedtotheCortex?
• Downloadtheprogramtoopenthedebugger
3.HavetheMasterCPUandROBOTCFirmwarebeendownloadedsuccessfullytotheCortex?
• Dotheyneedtobere-downloaded?
• DownloadtheMasterCPUFirmware
• DownloadtheROBOTCFirmware
• PowerCycletheCortex
• Retrydownloadingtheprogramtoopenthedebugger
Go to Reference Links