View Single Post
  #7   Spotlight this post!  
Unread 03-22-2010, 12:33 PM
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: cRIO upgrade v20 relay problems

Quote:
Originally Posted by Lakedaimon View Post
OK, I think the light bulb over my head is beginning to make buzzing noises and glow dimly.

We have not tried this yet (and please correct me if I am wrong), but it appears that the user watchdog is set to timeout after .1 seconds, and since our user code is sleeping for .5 seconds, nobody is kicking the dog, and it is therefore zapping us.

First, this evening we are going to try just disabling the user watchdog during init to see if that corrects the issue(?) Based on the results of that test, we will investigate changing the structure of our code to put some kind of dog-kicking mechanism into a separate thread, or setting the timeout on the watchdog to 1 second, or leave it disabled. (If leaving it disabled is verboten, PLEASE let me know!)

Assuming we are now merrily on our way, thanks for the input!
Sounds like you have it figured out. The best way to deal with this is to do your delaying asynchronously via a timer, thus letting your Watchdog get fed (not kicked! ) by your main thread of execution. But turning off the Watchdog or setting the timeout to something longer than your delay would also be technically correct (if a bit more unsafe). Making a separate thread to feed your Watchdog is not something that I would not recommend (having a safety mechanism in place that does nothing to ensure safety is arguably worse than having none at all).
Reply With Quote