Previous Page TOC Index Next Page

BeeSoft User's Guide and Reference

4.4 The Base Watchdog Timer

Your robot’s base is equipped with a protective feature called a watchdog timer that you can use to insure that the base will not continue to operate "independently" without further input from a controlling program. So, if you have network problems, if your system crashes, or if you encounter some other such unanticipated conundrum, your robot will halt its motion. By default, BeeSoft sets the watchdog timer for a mere few seconds. And to make sure the base will indeed halt all robot motion even if the program using the base module crashes , BeeSoft resets the timer before it expires.

However, if you’re controlling the base via colliServer, baseServer or some other client/server application, this default safety procedure may cause problems. The server might still be running, but the client controlling the base may not be responding. Therefore, you might want to explicitly control when the watchdog timer is reset, and when it is allowed to expire. You can use these calls.

void registerWatchdogCallback (void function_ptr (void) );

Allows you to specify a function to be called if the watchdog timer expires. This is useful for restarting your robot’s motion, or for ending your program.

void assumeWatchdog ( );

Your user program assumes responsibility for the watchdog timer. This call causes the base module to stop automatically, resetting the watchdog timer. If you don’t explicitly reset the timer in time, the base will halt until you do reset the timer. When you make this call, the base will reset the watchdog timer itself one final time. If the watchdog timer is allowed to expire,base motion commands will be ignored until you call watchDogTimer to reset the timeout.

void watchDogTimer (unsigned long interval);

Resets the watchdog timer. If you don’t reset the timer again before the specified interval expires, the base will halt. Specify interval in units of 1/256ths of a second.

Previous Page Page Top TOC Index Next Page