Go to Post Redfoo is actually a really awesome guy. He discussed the future of engineering and talked about C programming with our software team. - SM987 [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 02-03-2009, 01:03
big1boom big1boom is offline
Chains=Fun
FRC #2022 (Titan Robotics)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Aurora
Posts: 267
big1boom is a glorious beacon of lightbig1boom is a glorious beacon of lightbig1boom is a glorious beacon of lightbig1boom is a glorious beacon of lightbig1boom is a glorious beacon of lightbig1boom is a glorious beacon of light
Re: Watchdog!?!?!?!

We only experienced problems when on the field. Tethered in the pits we had autonomous, on the field we had not autonomous, and had no teleoperated except our manipulator. Thank you Simbotics for finding our problem.
__________________
Reply With Quote
  #17   Spotlight this post!  
Unread 02-03-2009, 01:10
keehun's Avatar
keehun keehun is offline
Team Captain
AKA: Keehun Nam
FRC #2502 (EP Robotics)
Team Role: Leadership
 
Join Date: May 2008
Rookie Year: 2008
Location: Eden Priaire
Posts: 474
keehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond reputekeehun has a reputation beyond repute
Send a message via AIM to keehun
Re: Watchdog!?!?!?!

Quote:
Originally Posted by Wayne TenBrink View Post
Our programming mentor has about 2 months worth of experience with LabView.
Don't worry, I was the main programmer and that's about what I had, too.

Quote:
Originally Posted by Wayne TenBrink View Post
When you all describe "feeding the watchdog", what actually does that? From your description, I assume that its some built-in, behind the scenes, function of the code that just happens without any special "instruction" from our programmer. And if the code is too busy or gets stuck in a "while" loop, it doesn't feed the watchdog.
Yes. There is a WPI library block which gets input a boolean(?) which I think is tied to some low level vxWorks call. When vxWorks doesn't see it, then it probably stops the .rtexe and decides to tell the DS that the Watchdog has sadly starved to death. (figuratively)

Quote:
Originally Posted by Wayne TenBrink View Post
What would make that happen only intermittently?
I highly doubt it is anything but the code..

Quote:
Originally Posted by Wayne TenBrink View Post
We would like to think it was field/system related, but we really don't know.
This, I highly doubt, especially if it was only your robot with this problem.

Quote:
Originally Posted by Wayne TenBrink View Post
Is there a credible scenario where static electricity could be involved?
What I think is possible is that your battery was low (6~7 volts) and cRio had problems. This "symptom" would be different, so I doubt it.

Quote:
Originally Posted by Wayne TenBrink View Post
What about startup sequencing? I've read where some teams had communication problems when they powered up the robot before the DS. We generally powered up the DS first, but probably not always. I wouldn't think that would necessarily have anything to do with watchdog.
This would be more of an issue with "No Comms" error message, which is worse.

Quote:
Originally Posted by Wayne TenBrink View Post
We generally like the new control system and LabView, but are anxious to find out where the bugs are hiding out and get rid of them.
If you compete in another regional, maybe you can upload your code and we can look it over for any unending loops?

Good luck!
Keehun
Team 2502
__________________
For by grace you have been saved through faith, and that not of yourselves; it is the gift of God, not of works, lest anyone should boast. -- Ephesians 2:8-9
2010: Quarter Finalist (MN 10,000 Lakes)
2010: Website Award (MN 10,000 Lakes)
2009: Quarter Finalist (MN 10,000 Lakes)
2009: GM Industrial Award (MN 10,000 Lakes)
Reply With Quote
  #18   Spotlight this post!  
Unread 02-03-2009, 01:32
StephenB StephenB is offline
Registered User
no team (Team NI)
 
Join Date: Feb 2009
Rookie Year: 2003
Location: Austin
Posts: 11
StephenB will become famous soon enough
Re: Watchdog!?!?!?!

Quote:
Originally Posted by keehun View Post
Yes. There is a WPI library block which gets input a boolean(?) which I think is tied to some low level vxWorks call. When vxWorks doesn't see it, then it probably stops the .rtexe and decides to tell the DS that the Watchdog has sadly starved to death. (figuratively)
The watchdogs are actually implemented on the FPGA. So when the cRIO gets a new TCP packet it feeds the FPGA system watchdog. And if you enable the user watchdog and call the feed subVI... you are feeding the FPGA section for that watchdog. Again, this is explained in more detail at: http://decibel.ni.com/content/docs/DOC-2957


Quote:
I highly doubt it is anything but the code..
This, I highly doubt, especially if it was only your robot with this problem.
Yes exactly. If you say... set up your user watchdog to have a 0.5s time out... and you only feed the watchdog every 1s. Then your motors will cut out for half of every second.


The .rtexe doesn't get stopped. Your code keeps running just like before, but the FPGA gets set to a fail safe state, where no outputs are usable. You can still read in anything and run like normal, but when either watchdog is tripped no outputs are available.
Reply With Quote
  #19   Spotlight this post!  
Unread 02-03-2009, 02:21
Arthur S's Avatar
Arthur S Arthur S is offline
Registered User
FRC #0004 (Element)
Team Role: Programmer
 
Join Date: Apr 2008
Rookie Year: 2007
Location: Northirdge California
Posts: 31
Arthur S is on a distinguished road
Send a message via AIM to Arthur S
Re: Watchdog!?!?!?!

This happened to us(team 4) about 3 years ago. Our lead programmer was using interrupts while trying to program the gear tooth sensor we had on our robot. This did not work out to well because the code had to finish within 23.6 milliseconds(if i remember correctly), but due to the interrupts it made the code exceed that time limit. This is what tripped the watchdog and caused a code error. You might wanna check any of your code that uses interrupts and make sure that no interrupts are interrupting interrupts(boy does that sound confusing). Hope i helped in any way.
__________________
all models are wrong, but some are useful.
-George E. P. Box

Last edited by Arthur S : 02-03-2009 at 03:12.
Reply With Quote
  #20   Spotlight this post!  
Unread 02-03-2009, 07:55
PinionTwister PinionTwister is offline
Registered User
FRC #0269 (Cooney Tech)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Oconomowoc
Posts: 39
PinionTwister is on a distinguished road
Re: Watchdog!?!?!?!

We did not experience the problem when tethered or when working with our own wireless system. Once connected to the field management system we experienced the same problem ("WATCHDOG" appearing in the Driver Station).

Check the wait timers in all your loops. Make sure you have wait timers in all loops!
Don't make them ALL the same value.
Feed the watchdog into the fastest loop.
Reply With Quote
  #21   Spotlight this post!  
Unread 02-03-2009, 08:58
professorX professorX is offline
Registered User
AKA: Xavier
FRC #1660 (The Harlem Knights)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: New York
Posts: 62
professorX is an unknown quantity at this point
Re: Watchdog!?!?!?!

Quote:
Originally Posted by Wayne TenBrink View Post
...
Two of the match failures occurred at the start of the match, resulting in no autonomous motion, and nothing after it either (until we learned how to reset the cRio from the DS (thanks 494)). One of our failures occurred after a successful autonomous. I don't know for sure if we got the "watchdog" message that time, but one side of the drive train (Jaguar/CIM) didn't work after autonomous. After the match, we found no problems and the problem didn't repeat.
Can you please share with us how to reset the cRIO from the DS?

I appreciate it.
Reply With Quote
  #22   Spotlight this post!  
Unread 02-03-2009, 09:12
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,532
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Watchdog!?!?!?!

To try to clarify this (and get rid of the cute "feed" term):

Feeding the watchdog is nothing more than letting the watchdog code run once in a while. This tells the system that the robot is still "under control".

A VERY easy way to not allow the watchdog code to run is to put your camera code in the same loop as the drive code. The camera code is processor hungry and will run as often as it can - and not allow the watchdog to run.

As other people have said - infinite loops, looping with no wait statement, and a couple other items can cause the watchdog to kick off. We struggled with it earlier when we put our camera code in our drive code as an experiment. It was a good learning experience!
Reply With Quote
  #23   Spotlight this post!  
Unread 02-03-2009, 09:44
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Watchdog!?!?!?!

Quote:
Originally Posted by Stuart View Post
ok just to be proactive. ( I have not run in to this problem with our own robot or any other that Ive messed with, but then Murphy's law n such.)

if you take out all the delay and feeds in auto mode. and replace them with your own way of delaying, AND place a parallel 100ms feed loop, everything will be OK?
The parallel loop effectively kills the usefulness of the watchdog - even if your important code hangs, this artificial loop will keep it fed. At that point, just disable the dog and be done with it (I don't recommend this).
Reply With Quote
  #24   Spotlight this post!  
Unread 02-03-2009, 13:01
Wayne TenBrink's Avatar
Wayne TenBrink Wayne TenBrink is offline
<< (2008 Game Piece)
FRC #1918 (NC Gears)
Team Role: Engineer
 
Join Date: Apr 2007
Rookie Year: 2006
Location: Fremont, MI, USA
Posts: 527
Wayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond reputeWayne TenBrink has a reputation beyond repute
Re: Watchdog!?!?!?!

Regarding our robot, apparently we do have some camera code in the program even though we aren't using the camera. We had previously planned to use it, and our programmer had made some progress with tracking software. We later decided to focus on defensive maneuvers and enter teleoperation with a loaded hopper.

Any code for driving the motors (or servos?) is disabled, but apparently the code is still trying to collect images from the camera. We will remove all of that. I don't know if it is (was) in the same loop as the drive code.

We will also verify all the device setup (IP addressing, etc.).

To professorX: To reset the cRio from the DS, simultaneously press all three white buttons on the DS and hold for a second or so. A new menu will come up and you can "select" reset. It takes about 20 seconds, but thats a lot better than sitting idle for the entire match. I recommend you test/practice in the pit on tether.

Thanks to all for your help on this.
Reply With Quote
  #25   Spotlight this post!  
Unread 02-03-2009, 16:13
NC GEARS's Avatar
NC GEARS NC GEARS is offline
Registered User
AKA: David Carrier
FRC #1918 (NC GEARS)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Newaygo, MI
Posts: 26
NC GEARS is an unknown quantity at this point
Re: Watchdog!?!?!?!

Yes, thanks to everyone for the help. Hopefully we can resolve our issues with your support. Thanks again to everyone.
__________________
United States Coast Guard Academy
Class of 2014



Reply With Quote
  #26   Spotlight this post!  
Unread 02-03-2009, 16:24
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Watchdog!?!?!?!

I think the driver station should be updated so that it reads either
"System Watch Dog" or "User Watch Dog" that would help teams who
are not sure which is active.

I also wish they would change the DS so it says "Status: No Code" instead of "Battery: No Code". Because people keep asking, "Why does the battery need code?"
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
Reply With Quote
  #27   Spotlight this post!  
Unread 02-03-2009, 18:57
StephenB StephenB is offline
Registered User
no team (Team NI)
 
Join Date: Feb 2009
Rookie Year: 2003
Location: Austin
Posts: 11
StephenB will become famous soon enough
Re: Watchdog!?!?!?!

Quote:
I think the driver station should be updated so that it reads either
"System Watch Dog" or "User Watch Dog" that would help teams who
are not sure which is active.
since the system watchdog is tripped entirely by communication loss, that event is already covered. 'No comms' means no network connection and therfore the system watchdog has been tripped. 'Watchdog' means the user.
Reply With Quote
  #28   Spotlight this post!  
Unread 02-03-2009, 20:22
Mike Bennett Mike Bennett is offline
Registered User
FRC #1918
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Fremont, Michigan
Posts: 5
Mike Bennett is an unknown quantity at this point
Re: Watchdog!?!?!?!

Now that we have learned that we probably need a timer delay, the question has been raised as to "what is a reasonable delay?"
For our robot during autonomous mode the only thing that might be time critical is the reading of the gyro to test if we have turned the number of degrees that we want.

It would seem that we don't want to tie up the CPU any more than necessary.
Reply With Quote
  #29   Spotlight this post!  
Unread 03-03-2009, 12:11
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,532
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Watchdog!?!?!?!

In the past, all examples I have seen suggested something on the order of 5-10 milliseconds.
Reply With Quote
  #30   Spotlight this post!  
Unread 03-03-2009, 19:28
professorX professorX is offline
Registered User
AKA: Xavier
FRC #1660 (The Harlem Knights)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: New York
Posts: 62
professorX is an unknown quantity at this point
Re: Watchdog!?!?!?!

Quote:
Originally Posted by Wayne TenBrink View Post
Regarding our robot, apparently we do have some camera code in the program even though we aren't using the camera. We had previously planned to use it, and our programmer had made some progress with tracking software. We later decided to focus on defensive maneuvers and enter teleoperation with a loaded hopper.

Any code for driving the motors (or servos?) is disabled, but apparently the code is still trying to collect images from the camera. We will remove all of that. I don't know if it is (was) in the same loop as the drive code.

We will also verify all the device setup (IP addressing, etc.).

To professorX: To reset the cRio from the DS, simultaneously press all three white buttons on the DS and hold for a second or so. A new menu will come up and you can "select" reset. It takes about 20 seconds, but thats a lot better than sitting idle for the entire match. I recommend you test/practice in the pit on tether.

Thanks to all for your help on this.
Thank you for the help.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
WatchDog Timeout popo308 Programming 3 22-02-2009 22:04
Watchdog darty NI LabVIEW 8 16-02-2009 09:11
System: Watchdog problems dboisvert C/C++ 7 16-02-2009 02:36
System: Watchdog problems dboisvert C/C++ 1 15-02-2009 20:12
Watchdog Barchechath Programming 6 10-02-2007 20:05


All times are GMT -5. The time now is 17:31.

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