Error: a timeout has been exceeded

the full errer reads: ERRER: A timeout has been exceeded: RobotDrive… Output not updated often enough. …in Check() in C:/WindRiver/workspace/WPILib/MotorSafetyHelper.cpp at line 123

does any one know how to fix it. I feel like it might be something simple, but my brain is fried.

please help…

That usually means that the motors in your RobotDrive object aren’t being refreshed often enough or the timeout on the motor safety is too short. Check that you don’t have any long Wait function calls that would put a delay between motor speed updates.


the only wait a have if the wait(0.005) for the motor update

Forgot to include my code
here it is:

#include “WPILib.h”


  • This is a demo program showing the use of the RobotBase class.
  • The SimpleRobot class is the base of a robot application that will automatically call your
  • Autonomous and OperatorControl methods at the right time as controlled by the switches on
  • the driver station or the field controls.
    class RobotDemo : public SimpleRobot
    RobotDrive myRobot; // robot drive system
    Joystick stick; // only joystick
    Jaguar jag;

myRobot(1, 3, 2, 10), // front left, rear left, front right, rear right
stick(1), //these must be initialized in the same order



  • Drive left & right motors for 2 seconds then stop
    void Autonomous(void)
    myRobot.MecanumDrive_Cartesian(0.0, 0.5, 0.0, 0.0); // drive forwards half speed
    Wait(2.0); // for 2 seconds
    myRobot.MecanumDrive_Cartesian(0.0, 0.0, 0.5, 0.0); // spin robot
    Wait(2.0); // for 2 seconds
    myRobot.MecanumDrive_Cartesian(0.0, 0.0, 0.0, 0.0); // stop robot


  • Runs the motors with single stick holonomic steering.
  • comment
    void OperatorControl(void)

while (IsOperatorControl());
myRobot.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetTwist(), 0); // drive with arcade style (use right stick)
Wait(0.005); // wait for a motor update time


Are you seeing this error a time or two, or is it repeating in the window? Is the robot functioning?

it repeats over and over in the diagnostics messages box. it funtions in autonomous but not in teleop

Saw your code after I posted. You shouldn’t have a semicolon after your while statement in teleop, your code is looping doing nothing.

The above code looks fine to me…the brackets all balance and I do not see an out of place semicolon.

I am having the exact same problem, but only with the old CRIO. The new CRIO works fine. No idea what is causing it yet. Even happens with just the raw, unmodified, SimpleRobot template.

This line is definitely not fine

while (IsOperatorControl());

You’re right, didn’t see the semi before the bracket.

Nonetheless, the problem seems to come from not turning off the robot safety. Worked for me.

Cody, your issue might be that the expiration time has not been set.

Use the motorsafty member GetExpiration() to see what the time is set too and the member SetExpiration(float timeout) to set a time.

See if this helps.


Yes, the error suggests the code was run even with the semicolon problem, but it expired during that command. Starting to wonder if the command based stuff is that much better.

My team had this problem last night - we declared a robotdrive, but only used it some of the time. If the trigger was down, we drove the drive motor Jaguar instances directly by calling Jaguar::Set. We assume that the RobotDrive instance didn’t like that IT wasn’t getting called for a period of time, even though we were in fact updating the motors.

We fixed it by adjusting our direct-set code to run through RobotDrive instead.

It looks like this isn’t the same as your problem since (aside from the semicolon after the while loop) your code always calling the RobotDrive functions.

Suggestion: Maybe try RobotDrive::TankDrive or RobotDrive::ArcadeDrive just to rule out it being a problem with the RobotDrive::MecanumDrive_Cartesian function?