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

  1. Computer does not recognize a VEX® Cortex.
  2. ROBOTC program will not download using a USB connection.
  3. ROBOTC Firmware will not download using a USB connection.
  4. Master CPU Firmware will not download using a USB connection.
  5. ROBOTC programdoes not compile.
  6. ROBOTC program compiles, but behavioris unexpected.
  7. ROBOTC Debugger does not open.
  8. Motors and/or Sensors Debug windows does not function correctly.
  9. ROBOTC program does not immediately run when Cortex is powered on.
  1. Problem: Computer does not recognize a VEX Cortex.
  2. Was the correct startup sequence followed when connecting the Cortex to the computer?
  3. Turn the Cortex off.
  4. Connect the Cortex to a computer using a USB cable.
  5. Turn the Cortex on.
  6. Download a program again.
  1. Is the battery connected to the Cortex sufficiently charged?
  2. Replace with a fully charged battery.
  3. Download a program again.
  1. Power cycle the Cortex.
  2. Turn the Cortex off.
  3. Connect the Cortex to a computer using a USB cable.
  4. Turn the Cortex on.
  5. Download a program again.
  1. Use another USB port on the computer.
  2. Turn the Cortex off.
  3. Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
  4. Turn the Cortex on.
  5. Download a program again.
  1. Put the Cortex into “Bootload” mode.
  2. Turn the Cortex off with a charged battery connected.
  3. Push and hold the CortexConfig button.
  4. Attach a USB cable between the PC and Cortex.
  5. Wait for the Robot, VEXnet, and Game lights to blink green.
  6. Release Config button.
  7. Turn the Cortex on.
  8. 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.

  1. 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.
  2. Contact the Tech Support at your school for appropriateprivileges.
  1. 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

  1. Problem: ROBOTC program will not download using a USB connection.
  2. Was the correct startup sequence followed to connect a Cortex to a computer?
  3. Turn the Cortex off.
  4. Connect the Cortex to a computer using a USB cable.
  5. Turn the Cortex on.
  6. Download a program.
  1. Does the program compile?
  2. Repairerrors indicated with a red x in the window at the bottom of the screen.
  3. Download a program.
  1. Is the correct Platform Type selected?
  2. Verify that the correct platform type is selected by selecting Robot then Platform Type.
  3. Download a program.
  1. Replace the battery with one sufficiently charged.
  2. Exchange a battery for a fully charged battery.
  3. Download a program.
  1. Power cycle the Cortex.
  2. Turn the Cortex off.
  3. Connect the Cortex to a computer using a USB cable.
  4. Turn the Cortex on.
  5. Download a program.
  1. Download the Master CPU and ROBOTC to the Cortex.
  2. Download the Master CPU firmware.
  3. Download the ROBOTC firmware.
  4. Power cycle the Cortex shown in a previous step.
  5. Download a program.
  1. Use another USB port on the same computer.
  2. Turn the Cortex off.
  3. Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
  4. Turn the Cortex on.
  5. Download a program.
  1. Restart the ROBOTC software.
  2. Close the ROBOTC software.
  3. Open the ROBOTC software.
  4. Load a program.
  5. Download a program.
  1. Restart the computer.
  2. Restart your computer.
  3. Open ROBOTC.
  4. Turn the Cortex off.
  5. Connect the Cortex to a computer using a USB cable.
  6. Turn the Cortex on.
  7. Download a program.
  1. Additional suggestions.
  2. Download the same program on another computer using the same Cortex.
  3. Download the same program on the same computer using a different Cortex.
  4. Replace the USB A-to-A cable with another cable.

Back To Categories

  1. Problem: ROBOTC Firmware will not download using a USB connection.
  2. Was the correct startup sequence followed to connect a Cortex to a computer?
  3. Turn the Cortex off.
  4. Connect the Cortex to a computer using a USB cable.
  5. Turn the Cortex on.
  6. Download the ROBOTC firmware.
  1. Was the Master CPU Firmware successfully downloaded?
  2. Download the Master CPU firmware.
  3. Download the ROBOTC firmware.
  1. Is the correct Platform Type selected?
  2. Verify that the correct platform type is selected by selecting Robot then Platform Type.
  3. Download the ROBOTC firmware.
  1. Replace the battery with one sufficiently charged.
  2. Exchange a battery for a fully charged battery.
  3. Download the ROBOTC firmware.
  1. Power cycle the Cortex.
  2. Turn the Cortex off.
  3. Connect the Cortex to a computer using a USB cable.
  4. Turn the Cortex on.
  5. Download the ROBOTC firmware.
  1. Use another USB port on the same computer.
  2. Turn the Cortex off.
  3. Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
  4. Turn the Cortex on.
  5. Download the ROBOTC firmware.
  1. Restart the ROBOTC software.
  2. Close the ROBOTC software.
  3. Open the ROBOTC software.
  4. Download the ROBOTC firmware.
  1. Restart the computer.
  2. Restart your computer.
  3. Open ROBOTC.
  4. Turn the Cortex off.
  5. Connect the Cortex to a computer using a USB cable.
  6. Turn the Cortex on.
  7. Download the ROBOTC firmware.
  1. Slow down the execution of the firmware download using delays.
  2. Select Window, Menu level, Super User.
  3. Select View then Preferences.
  4. Select the Debuggertab.
  5. Add a 5 millisecond in the value shown in the box for Delay [milliseconds] between polling cycles.
  6. Download the ROBOTC firmware.
  7. Add 5 milliseconds to the same value until the ROBOTC firmware downloads successfully.
  1. Additional suggestions.
  2. Download the ROBOTC firmware on another computer using the same Cortex.
  3. Download the ROBOTC Firmware on the same computer using a different Cortex.
  4. Replace the USB A-to-A cable with another cable.

Back To Categories

  1. Problem: Master CPU Firmware will not download using a USB connection.
  2. Was the correct startup sequence followed to connect a Cortex to a computer?
  3. Turn the Cortex off.
  4. Connect the Cortex to a computer using a USB cable.
  5. Turn the Cortex on.
  6. Download the Master CPU firmware.
  1. Is the correct Platform Type selected?
  2. Verify that the correct platform type is selected by selecting Robot then Platform Type.
  3. Download the Master CPU firmware.
  1. Replace the battery with one sufficiently charged.
  2. Exchange a battery for a fully charged battery.
  3. Download the Master CPU firmware.
  1. Power cycle the Cortex.
  2. Turn the Cortex off.
  3. Connect the Cortex to a computer using a USB cable.
  4. Turn the Cortex on.
  5. Download the Master CPU firmware.
  1. Use another USB port on the same computer.
  2. Turn the Cortex off.
  3. Disconnect the Cortex from the USB port and insert the USB cable into a different USB port.
  4. Turn the Cortex on.
  5. Download the Master CPU firmware.
  1. Restart ROBOTC.
  2. Close ROBOTC.
  3. Open ROBOTC.
  4. Download the Master CPU firmware.
  1. Restart the computer.
  2. Restart your computer.
  3. Open ROBOTC.
  4. Turn the Cortex off.
  5. Connect the Cortex to a computer using a USB cable.
  6. Turn the Cortex on.
  7. Download the Master CPU firmware.
  1. Slow down the execution of the firmware download using delays.
  2. Select Window, Menu level, Super User.
  3. Select View then Preferences.
  4. Select the Debuggertab.
  5. Add a 5 millisecond in the value shown in the box for Delay [milliseconds] between polling cycles.
  6. Download the ROBOTC firmware.
  7. Add 5 milliseconds to the same value until the Master CPU firmware downloads successfully.
  1. Install and use the VEXnet Firmware Upgrade Utility.
  2. Download the VEXnet Firmware Upgrade Utility from the link shown:
  3. Unzip the file containing the installation software and instructions.
  4. Follow the instructions included to update the firmware.
  1. Additional suggestions.
  2. Download the Master CPU firmware on another computer using the same Cortex.
  3. Download the Master CPU firmware on the same computer using a different Cortex.
  4. Replace the USB A-to-A cable with another cable.

Back To Categories

  1. Problem: ROBOTC program does not compile.
  2. If Natural Language functions are needed, then confirm that Natural Language platform type is selected.
  3. Select Robot then Platform Type.
  4. Select the Natural Language option if there is no check mark.
  5. Select Robotthen Compile Program.
  1. Is the correct Platform Type selected?
  2. Verify that the correct platform type is selected by selecting Robot then Platform Type.
  3. Select Robot then Compile Program.
  1. Check the code for errors.
  2. Confirm that all required curly braces are present.
  3. Confirm that all required semicolons are present.
  4. Confirm that all commands or variablesdo not contain improper capitalization.
  5. Confirm that all commands or variablesdo not contain a typo.
  6. Select Robot then Compile Program.
  1. Checkthe ROBOTC errors window for warnings.
  2. 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.
  3. Double-click errors in the ROBOTC errors window to highlight the affected line in the program.
  4. Correct errors. Note that lines with a yellow x are only warnings and lines with a white x are only information andnot an error.
  5. Select Robot then Compile Program.
  1. Compare the code with errors to code known to compile successfully.
  2. 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

  1. Problem: ROBOTC program compiles, but behavior is unexpected.
  2. Compare the code with errors to code known to compile successfully.
  3. 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.
  1. 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.
  2. Is an important line forgotten?
  3. Review the pseudocode. Does the sequence of steps follow the pseudocode?
  1. Use the ROBOTC Program Debug window to step through the code line-by-line.
  2. Download the program to the robot.
  3. When the Program Debug window appears, select Step to execute the program one line at a time.
  4. Observe the robot's behavior and compare to the desired behavior.
  5. Identify when the robot behavior differs from the desired behavior.
  1. Insert obvious indicators in the program.
  2. Insert a wait commandof an obvious length of time or turnLEDOn commands at crucial steps of the program.
  3. 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.
  4. Continue to insert and observe these obvious indicators until the problem is identified.

Back To Categories

  1. Problem: ROBOTC Debugger does not open.
  2. Was the correct startup sequence followed to connect a Cortex to a computer?
  3. Turn the Cortex off.
  4. Connect the Cortex to a computer using a USB cable.
  5. Turn the Cortex on.
  6. Download the program to open the debugger.
  1. Was the program downloaded to the Cortex?
  2. Download the program to open the debugger.
  1. Was the Master CPU and ROBOTC firmware successfully downloaded?
  2. Download the Master CPU firmware.
  3. Download the ROBOTC firmware.
  4. Power Cycle the Cortex.
  5. Download the program to open the debugger.
  1. Confirm the VEX® Cortex Communication Mode.
  2. Select Robot then VEX® Cortex Communicate Mode. Confirm that VEXnet or USB or USB Only is selected.
  3. If Competition was selected, then follow the steps below.
  4. Power cycle the Cortex.
  5. Turn the Cortex off.
  6. Disconnect the Cortex from the computer by removing either end of the USB cable.
  7. Connect the Cortex to the computer using a USB cable.
  8. Turn the Cortex on.
  9. Download a program.
  10. Download the program to open the debugger.

Back To Categories

  1. Problem: Motors and/or Sensors Debug windows do not function correctly.
  2. Replace the battery with one sufficiently charged.
  3. Exchange a battery for a fully charged battery.
  4. Turn the Cortex on.
  5. Observe the sensor data.
  1. Confirm that theMotors and Sensors Setup matches the physical robot.
  2. Select Robot then Motors and Sensors Setup.
  3. Download the program.
  1. Is the Program Debug window set to provide continuous updates?
  2. Download the program to the robot.
  3. In the Program Debug window, confirm that the Refresh is set to Continuous. If it is not, then select Continuous.
  4. Observe the sensor data.
  1. Was the Master CPU and ROBOTC firmware successfully downloaded?
  2. Download the Master CPU firmware.
  3. Download the ROBOTC firmware.
  4. Power Cycle the Cortex.
  1. Power cycle the Cortex.
  2. Turn the Cortex off.
  3. Connect the Cortex to a computer using a USB cable.
  4. Turn the Cortex on.
  5. Download the program.
  6. Observe the sensor data.
  1. Restart the ROBOTC software.
  2. Close the ROBOTC software.
  3. Open the ROBOTC software.
  4. Download the program.
  5. Observe the sensor data.

Back To Categories

  1. Problem: ROBOTC program does not immediately run when Cortex is powered on.
  2. Confirm the VEX® Cortex Communication Mode.
  3. Select Robot then VEX® Cortex Communicate Mode. Confirm that VEXnet, USB, or USB Only is selected.
  4. If Competition was selected, then follow the steps below.
  5. Power cycle the Cortex.
  6. Turn the Cortex off.
  7. Disconnect the Cortex from the computer by removing either end of the USB cable.
  8. Connect the Cortex to the computer using a USB cable.
  9. Turn the Cortex on.
  10. 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