|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Watchdog not fed
Hi - I am running 2010imagedemo code...
when I enable the robot in the driver station it says "watchdog not fed" for a few seconds and then the message goes away... and it goes into one of the three modes. Is this normal? And if not what can I do to fix it? |
|
#2
|
||||
|
||||
|
Re: Watchdog not fed
yes, this is normal due to the line that says
GetWatchdog().SetExpiration(1.0); Wait(3.0); Whoever wrote this was not thinking clearly |
|
#3
|
|||
|
|||
|
Re: Watchdog not fed
Quote:
If the driver's station goes into auto mode after a few seconds, one, what do we do if it STAYS in watchdog not fed mode, two, does anyone have a patch we could install to overwrite the existing code that doesn't work, three, how do we turn watchdog off? There is not a switch (green switch) on our copy of the software. I know y'all are laughing but hey...we gotta' ask! Cut us some slack already! Steve Miller Coach 3355 |
|
#4
|
||||
|
||||
|
Re: Watchdog not fed
GetWatchdog().SetEnabled(false);
HOWEVER, YOU SHOULD NOT DO THIS UNLESS YOU HAVE A VERY GOOD REASON, LIKE A BUNCH OF Wait STATEMENTS. GetWatchdog().Feed(); is your friend |
|
#5
|
||||
|
||||
|
Re: Watchdog not fed
Rather than disabling the watchdog (not a safe thing to do), you can also set the expiration of the watchdog to something like 5 seconds. That way, if your system hoses, the robot will automatically stop after 5 seconds.
e.g., GetWatchdog().SetExpiration(5.0); |
|
#6
|
||||
|
||||
|
Re: Watchdog not fed
I know (using LabVIEW) our team had this issue. Turns out we had to reset the robot each time. I'm not sure if they solved it though.
My Analogy:
|
|
#7
|
||||
|
||||
|
Re: Watchdog not fed
you don't have to kill the robot to solve the watchdog not fed error, just feed it (or give it a larger Expiration)
my interpretation of the watchdog analogy: there are two Watchdogs, System and user. The user watchdog is a poodle that you can kill at will. you also have a poodle re-animation device. On usercode load, you create a new poodle, and you can set its fatness (time to starve) via the SetExpiration. You must feed the poodle within this period, or it dies, falls down, and shorts the motors, so you cannot move until you re-animate it and it gets off the shorted circuts. so you feed it, and re-animate it, and you can continue |
|
#8
|
||||
|
||||
|
Re: Watchdog not fed
I think it was fixed by now (I''m not on Controls), but that's what we had to do.
|
|
#9
|
||||
|
||||
|
Re: Watchdog not fed
I don't know if this is useful at this point, but after struggling with watchdog issues throughout the build season, we corrected it by putting a 5 ms wait statement in our main loop. That cured the problem instantly, and it didn't come back.
(I'm not at all a programmer, but I know that's what they did, so I thought I'd share it here. Good luck teams!) Patrick |
|
#10
|
|||
|
|||
|
Re: Watchdog not fed
Quote:
We were experiencing system level watchdog "not fed" errors. For awhile we couldn't figure out what exactly was happening except that it had to do with the camera feed on the dashboard. It turned out that we were starving the background task/thread that was responsible for serving the dashboard with the camera image packets by hogging CPU time with our main task/thread (the thread that OperatorControl() runs within). This affected our communication between our driver station and cRIO, effectively timing-out the watchdog that monitored communication. The fix was to suspend the main thread for 5/100 of a second, thus giving other threads (ie, the camera feed thread) more time to execute. Code:
void OperatorControl() {
while(IsOperatorControl()) {
... do you own work ..
.. then at the end of the loop, suspend the task ..
Wait(0.05f);
}
}
Last edited by bronxbomber92 : 07-03-2010 at 14:15. |
|
#11
|
||||
|
||||
|
Re: Watchdog not fed
Thanks, Jedd.
|
|
#12
|
|||
|
|||
|
Re: Watchdog not fed
the 5/100 of a second seems plausible, any guesses if this will work for labview too? I'm sure it would, but i'd like other input
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "watchdog not fed" error | Lumit | NI LabVIEW | 8 | 04-02-2010 18:45 |
| Watchdog Not Fed but, All Systems Are Go. | DHSrobotics | Java | 4 | 24-01-2010 22:01 |
| Watchdog not fed | ahudson | Programming | 1 | 22-01-2010 11:26 |
| Fed Ex Airbill Troubles | Eric Reed | General Forum | 12 | 19-02-2007 14:31 |
| fed-ex shipping question | brennerator | General Forum | 2 | 23-03-2005 07:09 |