Go to Post Students, mentors, schools, corporations, teams, and communities - they are all critical to the success of FIRST. . - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-07-2007, 04:11 PM
Barchechath Barchechath is offline
Registered User
AKA: Ben Barchechath
FRC #1580
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Ashqelon Israel
Posts: 5
Barchechath is an unknown quantity at this point
Send a message via ICQ to Barchechath Send a message via MSN to Barchechath
Watchdog

Hi (again) !
I am trying to understand what is "watchdog", how to use "watch dog" and what it does?

Thank you all!
__________________
Ben Barchechath
  #2   Spotlight this post!  
Unread 02-07-2007, 04:23 PM
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Watchdog

If it's in reference to what I think it is, you are referring to the watchdog timer in our robot controller.

Basically, our user processor has to get data from the master processor when it comes in, and the user processor has to spit the new data outputs (to the motors, Spike relays, etc.) to the master processor. If the user code takes too long between grabbing data and spitting it back, the "watchdog" timer freezes our processor and flashes the "Code Error" light--it's red, so it's known as the "red light of death".

The user code doesn't have to do anything special to use the watchdog timer; it's just there--a feature of the IFI-proprietary master code loaded on the robot controller. We don't turn it on or off or set the delay; it's just there. If you're programming in easyC, don't worry about a thing. If you're programming in MPLAB, try not to put for loops or other extremely time-consuming tasks in your code, and if you do, make sure to thoroughly test it before trusting it.

Don't worry about the watchdog timer; it'll only shut your code down if you've written code that takes too long to execute.

And if you need more help, as always, post back and we'll try to help.

JBot
__________________
Aren't signatures a bit outdated?
  #3   Spotlight this post!  
Unread 02-07-2007, 05:03 PM
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Watchdog

FYI, if you're reading through the PIC reference manual and/or datasheet, there are references to a watchdog timer in the processor. This is not the same thing as the "watchdog" JBotAlan discussed. (I've never heard the term applied to the master processor before this year.)
  #4   Spotlight this post!  
Unread 02-07-2007, 05:22 PM
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Watchdog

Quote:
Originally Posted by Astronouth7303 View Post
(I've never heard the term applied to the master processor before this year.)
Well, I knew that the master processor would shut us down if we took too long, and I've heard of watchdog timers on PLCs and such, so I assumed that's what IFI called it. I haven't actually seen that term referring to the master processor either, but...that's what it is.

JBot
__________________
Aren't signatures a bit outdated?
  #5   Spotlight this post!  
Unread 02-08-2007, 12:19 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Watchdog

More generally, a "watchdog" is simply a timer that needs to be "serviced" every so often or the system activates some sort of fail-safe mechanisms. In the world of engineering, we often use watchdogs to monitor systems of several processors or devices - a pulse is periodically sent out to all devices, and if a response is not received in a given window of time, then the system assumes that the device that failed to respond has stopped working, and acts accordingly.

In FIRST, the master uP and user uP indeed have a watchdog-like relationship.
  #6   Spotlight this post!  
Unread 02-10-2007, 04:42 PM
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Watchdog

This can cause problems in some cases. namely, don't make my mistake i put a puts("a"); inside the encoder code that didn't work. it told us when they fired, but then the interrupts backed up too much and the watchdog shut us down. To make a long 30 minutes of hair pulling short, DON'T PRINT INSIDE THE INTERRUPTS!!!
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #7   Spotlight this post!  
Unread 02-10-2007, 08:05 PM
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Watchdog

Quote:
Originally Posted by paulcd2000 View Post
DON'T PRINT INSIDE THE INTERRUPTS!!!
Oh yeah, you've just discovered how slow printing is when compared to interrupts. Go as fast as you possibly can when inside an interrupt; you *will* see some strange behavior if you don't. A ++ of a variable is about all I will do inside an interrupt handler.
__________________
Aren't signatures a bit outdated?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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