Troubleshooting ROBOTC Guide
Introduction
This guide is designed to be used by a student or teacher as a reference for help troubleshooting ROBOTC programming problems. Navigate to the broad programming problem category and use the suggestions presented to attempt to resolve the problem.
ProgrammingProblem Categories
- Computer does not recognize a VEX® Cortex.
- ROBOTC program will not download using a USB connection.
- ROBOTC Firmware will not download using a USB connection.
- Master CPU Firmware will not download using a USB connection.
- ROBOTC programdoes not compile.
- ROBOTC program compiles, but behavioris unexpected.
- ROBOTC Debugger does not open.
- Motors and/or Sensors Debug windows does not function correctly.
- ROBOTC program does not immediately run when Cortex is powered on.
- Problem: Computer does not recognize a VEX Cortex.
- Was the correct startup sequence followed when connecting the Cortex to the computer?
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download a program again.
- Is the battery connected to the Cortex sufficiently charged?
- Replace with a fully charged battery.
- Download a program again.
- Power cycle the Cortex.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download a program again.
- Use another USB port on the computer.
- Turn the Cortex off.
- Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
- Turn the Cortex on.
- Download a program again.
- Put the Cortex into “Bootload” mode.
- Turn the Cortex off with a charged battery connected.
- Push and hold the CortexConfig button.
- Attach a USB cable between the PC and Cortex.
- Wait for the Robot, VEXnet, and Game lights to blink green.
- Release Config button.
- Turn the Cortex on.
- In the ROBOTC software, selectRobot, Download Firmware, and Automatically Update VEX® Cortex.
Note: This step may be necessary if the Master CPU Firmware was corrupted and/or only partially downloaded on the Cortex. If the wrong firmware, e.g., VEXnet Joystick, was downloaded to the Cortex, then this step may be necessary.
- Confirm that the computer allows for new hardware to be connected. Computers with limited administrative rights may prohibit new hardware such as the VEX® Cortex from being connected.
- Contact the Tech Support at your school for appropriateprivileges.
- SmartBoard software may cause a conflict with communication to a Cortex. The SMART Virtual TabletPC device can be disabled to resolve the conflict.
Back To Categories
- Problem: ROBOTC program will not download using a USB connection.
- Was the correct startup sequence followed to connect a Cortex to a computer?
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download a program.
- Does the program compile?
- Repairerrors indicated with a red x in the window at the bottom of the screen.
- Download a program.
- Is the correct Platform Type selected?
- Verify that the correct platform type is selected by selecting Robot then Platform Type.
- Download a program.
- Replace the battery with one sufficiently charged.
- Exchange a battery for a fully charged battery.
- Download a program.
- Power cycle the Cortex.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download a program.
- Download the Master CPU and ROBOTC to the Cortex.
- Download the Master CPU firmware.
- Download the ROBOTC firmware.
- Power cycle the Cortex shown in a previous step.
- Download a program.
- Use another USB port on the same computer.
- Turn the Cortex off.
- Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
- Turn the Cortex on.
- Download a program.
- Restart the ROBOTC software.
- Close the ROBOTC software.
- Open the ROBOTC software.
- Load a program.
- Download a program.
- Restart the computer.
- Restart your computer.
- Open ROBOTC.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download a program.
- Additional suggestions.
- Download the same program on another computer using the same Cortex.
- Download the same program on the same computer using a different Cortex.
- Replace the USB A-to-A cable with another cable.
Back To Categories
- Problem: ROBOTC Firmware will not download using a USB connection.
- Was the correct startup sequence followed to connect a Cortex to a computer?
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the ROBOTC firmware.
- Was the Master CPU Firmware successfully downloaded?
- Download the Master CPU firmware.
- Download the ROBOTC firmware.
- Is the correct Platform Type selected?
- Verify that the correct platform type is selected by selecting Robot then Platform Type.
- Download the ROBOTC firmware.
- Replace the battery with one sufficiently charged.
- Exchange a battery for a fully charged battery.
- Download the ROBOTC firmware.
- Power cycle the Cortex.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the ROBOTC firmware.
- Use another USB port on the same computer.
- Turn the Cortex off.
- Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
- Turn the Cortex on.
- Download the ROBOTC firmware.
- Restart the ROBOTC software.
- Close the ROBOTC software.
- Open the ROBOTC software.
- Download the ROBOTC firmware.
- Restart the computer.
- Restart your computer.
- Open ROBOTC.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the ROBOTC firmware.
- Slow down the execution of the firmware download using delays.
- Select Window, Menu level, Super User.
- Select View then Preferences.
- Select the Debuggertab.
- Add a 5 millisecond in the value shown in the box for Delay [milliseconds] between polling cycles.
- Download the ROBOTC firmware.
- Add 5 milliseconds to the same value until the ROBOTC firmware downloads successfully.
- Additional suggestions.
- Download the ROBOTC firmware on another computer using the same Cortex.
- Download the ROBOTC Firmware on the same computer using a different Cortex.
- Replace the USB A-to-A cable with another cable.
Back To Categories
- Problem: Master CPU Firmware will not download using a USB connection.
- Was the correct startup sequence followed to connect a Cortex to a computer?
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the Master CPU firmware.
- Is the correct Platform Type selected?
- Verify that the correct platform type is selected by selecting Robot then Platform Type.
- Download the Master CPU firmware.
- Replace the battery with one sufficiently charged.
- Exchange a battery for a fully charged battery.
- Download the Master CPU firmware.
- Power cycle the Cortex.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the Master CPU firmware.
- Use another USB port on the same computer.
- Turn the Cortex off.
- Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
- Turn the Cortex on.
- Download the Master CPU firmware.
- Restart ROBOTC.
- Close ROBOTC.
- Open ROBOTC.
- Download the Master CPU firmware.
- Restart the computer.
- Restart your computer.
- Open ROBOTC.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the Master CPU firmware.
- Slow down the execution of the firmware download using delays.
- Select Window, Menu level, Super User.
- Select View then Preferences.
- Select the Debuggertab.
- Add a 5 millisecond in the value shown in the box for Delay [milliseconds] between polling cycles.
- Download the ROBOTC firmware.
- Add 5 milliseconds to the same value until the Master CPU firmware downloads successfully.
- Install and use the VEXnet Firmware Upgrade Utility.
- Download the VEXnet Firmware Upgrade Utility from the link shown:
- Unzip the file containing the installation software and instructions.
- Follow the instructions included to update the firmware.
- Additional suggestions.
- Download the Master CPU firmware on another computer using the same Cortex.
- Download the Master CPU firmware on the same computer using a different Cortex.
- Replace the USB A-to-A cable with another cable.
Back To Categories
- Problem: ROBOTC program does not compile.
- If Natural Language functions are needed, then confirm that Natural Language platform type is selected.
- Select Robot then Platform Type.
- Select the Natural Language option if there is no check mark.
- Select Robotthen Compile Program.
- Is the correct Platform Type selected?
- Verify that the correct platform type is selected by selecting Robot then Platform Type.
- Select Robot then Compile Program.
- Check the code for errors.
- Confirm that all required curly braces are present.
- Confirm that all required semicolons are present.
- Confirm that all commands or variablesdo not contain improper capitalization.
- Confirm that all commands or variablesdo not contain a typo.
- Select Robot then Compile Program.
- Checkthe ROBOTC errors window for warnings.
- Review the ROBOTC errors window typically located at the bottom of the screen for a list of known errors, the line containing the error, and information about the error.
- Double-click errors in the ROBOTC errors window to highlight the affected line in the program.
- Correct errors. Note that lines with a yellow x are only warnings and lines with a white x are only information andnot an error.
- Select Robot then Compile Program.
- Compare the code with errors to code known to compile successfully.
- Open and compare the code with errors to similar ROBOTC Sample Programs by selecting File, Open Sample Program,and then selecting a code with a similar function to the code with errors.
Back To Categories
- Problem: ROBOTC program compiles, but behavior is unexpected.
- Compare the code with errors to code known to compile successfully.
- Open and compare the code with errors to similar ROBOTC Sample Programs by selecting File, Open Sample Program, and then selecting a code with a similar function to the code with errors.
- Imagine that you are a robot executing the code with errors. The robot will execute the program exactly as it is written without ignoring problems or adding lines on its own.
- Is an important line forgotten?
- Review the pseudocode. Does the sequence of steps follow the pseudocode?
- Use the ROBOTC Program Debug window to step through the code line-by-line.
- Download the program to the robot.
- When the Program Debug window appears, select Step to execute the program one line at a time.
- Observe the robot's behavior and compare to the desired behavior.
- Identify when the robot behavior differs from the desired behavior.
- Insert obvious indicators in the program.
- Insert a wait commandof an obvious length of time or turnLEDOn commands at crucial steps of the program.
- If the robot waits or ifan LED turns on and behaves correctly up to that time, then the program was correct up until that point.
- Continue to insert and observe these obvious indicators until the problem is identified.
Back To Categories
- Problem: ROBOTC Debugger does not open.
- Was the correct startup sequence followed to connect a Cortex to a computer?
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the program to open the debugger.
- Was the program downloaded to the Cortex?
- Download the program to open the debugger.
- Was the Master CPU and ROBOTC firmware successfully downloaded?
- Download the Master CPU firmware.
- Download the ROBOTC firmware.
- Power Cycle the Cortex.
- Download the program to open the debugger.
- Confirm the VEX® Cortex Communication Mode.
- Select Robot then VEX® Cortex Communicate Mode. Confirm that VEXnet or USB or USB Only is selected.
- If Competition was selected, then follow the steps below.
- Power cycle the Cortex.
- Turn the Cortex off.
- Disconnect the Cortex from the computer by removing either end of the USB cable.
- Connect the Cortex to the computer using a USB cable.
- Turn the Cortex on.
- Download a program.
- Download the program to open the debugger.
Back To Categories
- Problem: Motors and/or Sensors Debug windows do not function correctly.
- Replace the battery with one sufficiently charged.
- Exchange a battery for a fully charged battery.
- Turn the Cortex on.
- Observe the sensor data.
- Confirm that theMotors and Sensors Setup matches the physical robot.
- Select Robot then Motors and Sensors Setup.
- Download the program.
- Is the Program Debug window set to provide continuous updates?
- Download the program to the robot.
- In the Program Debug window, confirm that the Refresh is set to Continuous. If it is not, then select Continuous.
- Observe the sensor data.
- Was the Master CPU and ROBOTC firmware successfully downloaded?
- Download the Master CPU firmware.
- Download the ROBOTC firmware.
- Power Cycle the Cortex.
- Power cycle the Cortex.
- Turn the Cortex off.
- Connect the Cortex to a computer using a USB cable.
- Turn the Cortex on.
- Download the program.
- Observe the sensor data.
- Restart the ROBOTC software.
- Close the ROBOTC software.
- Open the ROBOTC software.
- Download the program.
- Observe the sensor data.
Back To Categories
- Problem: ROBOTC program does not immediately run when Cortex is powered on.
- Confirm the VEX® Cortex Communication Mode.
- Select Robot then VEX® Cortex Communicate Mode. Confirm that VEXnet, USB, or USB Only is selected.
- If Competition was selected, then follow the steps below.
- Power cycle the Cortex.
- Turn the Cortex off.
- Disconnect the Cortex from the computer by removing either end of the USB cable.
- Connect the Cortex to the computer using a USB cable.
- Turn the Cortex on.
- Download a program.
Back To Categories
© 2011 Project Lead The Way, Inc.
PLTW Gateway – Automation and Robotics VEX®Troubleshooting Guide: ROBOTC with VEX® Cortex – Page 1