Recent Updates

  • Using the C++ IDE there are two ways to load programs onto the cRIO

    • "Deploy" it onto the cRIO flash and run it on a reboot. This will keep the program in the cRIO's persistent memory and will load it each time the device reboots, but will not allow any of the debugging discussed above. This method is covered in this article
    • Attach to the cRIO and run the program using the debugger from your development system directly to the cRIO memory. This method will allow you to set breakpoints, step through code, view variable values and perform other debugging operations, however the code will not persist when the cRIO is rebooted. When the cRIO reboots, no code will be running! This method is covered in the next article, "Debugging a Robot Program".

    For tournaments you should always Deploy the program so that it will be there when the robot is restarted and the match is played.

  • Updated on: Jan 20, 2023

    Creating a robot project

    The simplest way to create a robot program, is to start from one of the supplied templates. Two choices are SimpleRobot and IterativeRobot. SimpleRobot is an easier to use template that is somewhat more limiting when creating more complex programs. The IterativeRobot template is a little more complex to get started, but in the long run lets you do more.

    The templates will get you the basis of a robot program, organizing a larger project can often be a complex task. RobotBuilder is recommended for creating and organizing your robot programs. You can learn more about RobotBuilder here. To create a command-based robot program that takes advantage of all the newer tools look at Creating a command based robot project in C++.

  • Updated on: Jan 20, 2023

    Installing the C++ Development Tools

    WindRiver Workbench is the development environment used for creating and loading C++ code onto a cRIO for FRC. This document describes how to install the Wind River Workbench environment as well as other supporting software you will need to program your robot. All images used in this document show the 2012 media, please refer to the text instructions for proper 2014 file names where necessary.

  • Updated on: Jan 20, 2023

    Using Netconsole

    The NetConsole is a way to remotely view the console output of the cRIO from any computer on the same network. This can be used to view debugging output from the cRIO, WPILib libraries, and/or from output statements in the user code (printf in C++, System.out.print in Java or RT Debug String VI in LabVIEW).

    Manual NetConsole
  • Updated on: Jan 20, 2023

    Using the motor safety feature

    Motor Safety is a mechanism in WPILib that takes the concept of a watchdog and breaks it out into one watchdog (Motro Safety timer) for each individual actuator. Note that this protection mechanism is in addition to the System Watchdog which is controlled by the Network Communications code and the FPGA and will disable all actuator outputs if it does not receive a valid data packet for 125ms.

  • Every sensor, actuator and operator interface component is an object in either C++ or Java programs. To use one of these you must create an instance of it using the class name. Any references to the objects such as reading values, setting values, or setting parameters is done through the reference. There are a number of utility objects in WPILib such as the RobotDrive and Compressor that don't represent a single sensor or actuator, but a larger subsystem.

    Another convention used throughout the library is the case of the method names. In C++ all methods start with an upper case letter, then are camel case (intermediate words capitalized). In Java all methods start with lower case letters then camel case for the remainder of the name.

  • Updated on: Jan 20, 2023

    Running the program on the robot

    Once the program is finished and NetBeans is configured the program can be run very easily. There are a few things you should know about running the program immediately after flashing a new image onto the cRIO that are described here.

  • Here's how to create the shortest possible robot program that actually does something useful. In this case, it provides tank steering in teleop mode and drives a few feet and stops in autonomous mode. This program uses the SimpleRobotTemplate which lets you write very simple programs very easily. For larger programs we recommend using the CommandBasedRobot template and RobotBuilder.

  • Updated on: Jan 20, 2023

    Configuring the NetBeans installation

    Netbeans needs to be configured to be able to download and run programs on your robot. Once configured, it can be used to run any program with the same team number.