Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Watchdogs (http://www.chiefdelphi.com/forums/showthread.php?t=94111)

Ian McShane 28-03-2011 17:26

Watchdogs
 
Can someone give me a brief overview on what watchdogs are? what they do and how they work.

Chris Hibner 28-03-2011 18:21

Re: Watchdogs
 
Quote:

Originally Posted by Ian McShane (Post 1046561)
Can someone give me a brief overview on what watchdogs are? what they do and how they work.

A simple explanation is a watchdog is a protection in the software to be sure your code doesn't take too much time to execute. One example that may cause this is if your code gets stuck in an infinite loop.

How does this protect your robot (and protect you from getting hurt)?

Let's say you command your drive motors to full power. Then let's say your code gets stuck in an infinite loop somewhere. In this situation, your motors would be at full power forever and your robot would crash into something, which is bad. Since you aren't feeding the watchdog during the infinite loop, eventually the watchdog would time-out, killing the power to your motors.

Basically, the watchdog is protection in your code to kill your motors if something goes wrong in your code.

Ian McShane 28-03-2011 18:26

Re: Watchdogs
 
Now watchdogs are virtual right? how do you program them.

Alan Anderson 28-03-2011 20:57

Re: Watchdogs
 
In the context of FRC and the 2011 software, the watchdog is there to keep your robot from going out of control due to loss of communication. It is all automatic. You don't do anything to program it.

The motor safety feature is sort of a minor watchdog that will help keep your robot from going out of control if you fail to set the drive motor values every tenth of a second. You should never need to "program" it. If you really know what you are doing, you can disable the safety feature to make certain programming patterns possible. If you're extra paranoid, you can enable the safeties on motors other than drive motors. But there's no reason for you to do anything with the safeties other than make sure you keep it happy by controlling the motors on a regular basis.

Ian McShane 29-03-2011 19:38

Re: Watchdogs
 
oooooooohhhhhhhh...well that is handy.


All times are GMT -5. The time now is 09:25.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi