FIRST Robotics Competition Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Archived: [FRC 2014] An Overview of FRC Watchdogs

This document does not apply to the current FRC season and is provided for reference only. It has been archived and is no longer being updated by National Instruments.

 

In computing, a "Watchdog Timer" is a timing device that triggers a piece of hardware or software into a fail-safe state due to some fault condition. The general concept is that when a system is running with a watchdog on, the system must 'feed' the watchdog every X amount of time. If the system is stuck doing something else, or there is a fault that prevents the system from feeding the watchdog, when X amount of time passes the system reverts to a fail safe state.

 

In the FRC control kit, there are two watchdogs.

 

System Watchdog

The system watchdog (always enabled) ensures the wireless and Compact RIO system are behaving properly. This is a watchdog built into the Compact RIO FPGA that is fed TCP packets through the Ethernet connection (wired or wireless) from the driver station to the cRIO-FRC. This happens by default and requires no additional setup from the user beyond normal IP address setup of the cRIO and driver's station. If anything disrupts the connection between the drivers station and the cRIO (such as a loss of wireless network connection) the FPGA turns off all PWM and actuator outputs. This immediately stops the robot and prevents a run-away robot. Additionally, the system watchdog will trigger if the competition dongle is not attached to the drivers station in the enabled position. Teams do not have any way to access or modify this watchdog. Ideally, this watchdog is entirely transparent to the user and just works.

 

User Watchdog

The user watchdog is optional. The user watchdog is provided in the robotics palette as a option for teams that wish to implement their own watchdog into their code. This user watchdog would be on top of the system watchdog. The user watchdog is made up of a collection of VIs that can be found in the Functions Palette at WPI Robotics  » Utilities » Watchdog. Users can look at the LabVIEW Help for the specifics about each of the VIs that make up the Watchdog palette. Additionally, there is a great user watchdog example that installs with LabVIEW which can be found by clicking More... at the bottom right of the Getting Started window. If the User Watchdog is triggered, either by not being fed in time or by manual triggering, it immediately turns off all motors and actuators just like the system watchdog.  An example of using this might be checking an accelerometer to see if your robot has flipped over and killing the watchdog if it has.

 

When a watchdog has triggered

The easiest way to tell if a watchdog has triggered is by looking at the green LED at the bottom of the digital side car, directly to the right of the white plastic two pin connector. This LED is pictured in Figure 1. If this LED is blinking slowly,either a watchdog has triggered or the system is disbaled by the driver's station. Your system is in the fail safe state where no motors or actuators can be driven. If this LED is solid, the system is operating normally. More information about the status LED can be found in Digital Sidecar Status LED Meanings.

digsidecar.jpg
Figure 1

 

Debugging watchdog problems

  • Isolate the issue to a specific watchdog. Eliminate the user watchdog from the troubleshooting by disabling it. Running any application that does not specifically open the user watchdog will ensure the user watchdog is disabled. Make sure this is the only application running on the cRIO. If the LED is still blinking, we can conclude the system watchdog is triggering.
    • Verify the competition dongle is attached to the driver's station and set to the enabled position.
    • The most common reason the system watchdog would trigger is if it is not being fed due to a network issue. Verify the network settings as defined in the FIRST Network configuration guide and reconfigure them as necessary. Many watchdog problems have been solved be going through and repeating the network setup steps.
    • Another reason the system watchdog may not be being fed is if the software versions on the computer, driver station, and cRIO do not match. Verify you have the latest version of the FRC LabVIEW or WPI development system and that the Compact RIO is running the corresponding 'image' from the cRIO Imaging tool. Verify that the drivers station software update has been performed.
    • If the system watchdog is working, but your specific code is not, the user watchdog is the culprit. This can be diagnosed with the debugging tools available in your development environment such as breakpoints. Verify that the user watchdog is being fed within its previously defined time limit.
Stephen B