Go to Post Some companies cut costs (and cut corners to do so). Some work hard to build loyal customers. Which would you rather purchase from? - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-11-2010, 16:57
RandomIteration RandomIteration is offline
Registered User
FRC #2941
 
Join Date: Nov 2010
Location: Benjamin Logan Highshool
Posts: 4
RandomIteration is an unknown quantity at this point
Intermitten power failures

Hello I am from Team 2941, and over a rather recent time frame, I have converted our robot from Labview to C++. For the most part, the robot has worked solidly (with that being said, I have stored previous versions of the robot that do not suffer such sporadic power failures).

Well to the point now outside of the background information; between some time interval (~5 seconds over wireless; really random on wired, ten seconds to a whole minute) the cRio cuts power to all the systems so the victors and solenoids will flash for a moment (no power is being sent through). I was originally programming with pthreads (avoid watchdog use where I can ), and have ultimately removed all threads except for the robot drive. At the current state, it is

GetWatchdog().SetEnabled(False);
while( TeleOperated()){
Wait(0.05);
}

The diagnostic light blinks every 200ms, for about 200ms; however, we do not have the jumper hooked up acrossed it. (Mind you, the only thread running is now the Teleoperated main). We have flashed the cRio with Windriver, swapped out our Distribution board, sidecar, and victors for jaguars.

So with that monster of a story, anyone have thoughts or answers?
Reply With Quote
  #2   Spotlight this post!  
Unread 14-11-2010, 17:43
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Intermitten power failures

I would try disabling every part on the robot physically and slowly reenable them until you find the bad component, its usually a rouge jaguar or something
Reply With Quote
  #3   Spotlight this post!  
Unread 14-11-2010, 17:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,576
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Intermitten power failures

You can disable the user watchdog, but you can't disable the system (communications) watchdog. Is there anything printed on the diagnostics tab of the driver station? Does it do it with the default code?

Last edited by Joe Ross : 14-11-2010 at 17:56.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-11-2010, 17:57
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Intermitten power failures

i mean unplug everything non-essential and plug stuff in till it breaks
Reply With Quote
  #5   Spotlight this post!  
Unread 14-11-2010, 23:46
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Intermitten power failures

are you attempting to run the camera? We experienced a similar fault during the season because of our frame pushing on the camera reset button. If there are any references to the camera class at all in your code and the camera is not connected or otherwise unable to communicate, the camera task will consume enough resources to trip the system watchdog.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"

Last edited by Radical Pi : 14-11-2010 at 23:51.
Reply With Quote
  #6   Spotlight this post!  
Unread 15-11-2010, 07:52
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Intermitten power failures

Just a minor clarification. I believe the camera classes will timeout when the camera is down or not connected. If you have the camera code in the same thread that feeds the watchdog, your watchdog will be fed late, but the CPU load will not be high. If the camera code is in its own thread/task, the camera code will slowly return errors, with no impact on the rest of the robot.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 15-11-2010, 09:02
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,792
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Intermitten power failures

Greg,
Can you check with NI Rep Andrew on this one? I believe we found that under certain conditions, loops with in user programs caused a slight lag in program execution which caused a watchdog issue. This was a common problem throughout the season last year regardless of which language was used. Due to the error, all output was halted for a brief period. It manifests as a power loss but is not. Conditions included loss of robot indicator, loss of motor drive, compressor shuts off, robot twitches, etc.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #8   Spotlight this post!  
Unread 15-11-2010, 11:06
RandomIteration RandomIteration is offline
Registered User
FRC #2941
 
Join Date: Nov 2010
Location: Benjamin Logan Highshool
Posts: 4
RandomIteration is an unknown quantity at this point
Re: Intermitten power failures

Sorry little more to add to this; we have swapped out the power distribution board, the sidecar, jaguars, taken the camera code out, and probably something else I have forgetten.

This has produced nearly the same results (but if it is a communication error, and say it were the communication watchdog, is there way around it?)
Reply With Quote
  #9   Spotlight this post!  
Unread 15-11-2010, 12:41
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Intermitten power failures

Quote:
Originally Posted by RandomIteration View Post
Hello I am from Team 2941, and over a rather recent time frame, I have converted our robot from Labview to C++. For the most part, the robot has worked solidly (with that being said, I have stored previous versions of the robot that do not suffer such sporadic power failures).
Just curious, and perhaps my reading of what you wrote above is not what you intended, but have you tried re-loading one of these "stored previous versions of the robot that does not suffer such sporadic power failures" and see if it still works?

Quote:
while( TeleOperated()){
Wait(0.05);
}
A bit off-topic, but why are you running Teleop at 20Hz ?



Reply With Quote
  #10   Spotlight this post!  
Unread 15-11-2010, 12:52
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Intermitten power failures

Quote:
Originally Posted by Greg McKaskle View Post
Just a minor clarification. I believe the camera classes will timeout when the camera is down or not connected. If you have the camera code in the same thread that feeds the watchdog, your watchdog will be fed late, but the CPU load will not be high. If the camera code is in its own thread/task, the camera code will slowly return errors, with no impact on the rest of the robot.

Greg McKaskle
This did not appear to be the case on our robot. The only reference to the camera was in the (C++) constructor so that camera images would be forwarded to our robot. Watching the output on NetConsole, errors were flooding and appeared to have no timeout. Another symptom we encountered with this was the clock on the Driver Station freezing with the robot but no watchdog error was being shown in the bottom left corner. This was also running with a Serial-based CAN.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #11   Spotlight this post!  
Unread 15-11-2010, 22:01
RandomIteration RandomIteration is offline
Registered User
FRC #2941
 
Join Date: Nov 2010
Location: Benjamin Logan Highshool
Posts: 4
RandomIteration is an unknown quantity at this point
Re: Intermitten power failures

Quote:
Originally Posted by Ether View Post
Just curious, and perhaps my reading of what you wrote above is not what you intended, but have you tried re-loading one of these "stored previous versions of the robot that does not suffer such sporadic power failures" and see if it still works?
And yeah, I must have poorly typed that. We went back to older code (simpler ones) to see if it was software.

Quote:
A bit off-topic, but why are you running Teleop at 20Hz ?


Honestly, toned it down cause I wasn't sure if the usual 50hz was stressing the cRio. Well guess not (part of the whole debugging thing ) .
Reply With Quote
  #12   Spotlight this post!  
Unread 15-11-2010, 22:02
RandomIteration RandomIteration is offline
Registered User
FRC #2941
 
Join Date: Nov 2010
Location: Benjamin Logan Highshool
Posts: 4
RandomIteration is an unknown quantity at this point
Re: Intermitten power failures

Oh and mind you, I had removed all traces of the camera (as ours is broken; circuit boad gets stressed too much, causes camera to fail).
Reply With Quote
  #13   Spotlight this post!  
Unread 16-11-2010, 08:27
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Intermitten power failures

Camera communication is over TCP, and both the reads and writes have timeouts of 0.5 or 1 second on LV. I can't say what they are on C++. This was my basis for saying that I didn't expect a large CPU spike with the camera wasn't plugged in or powered.

When I said slow errors, that is of course not very definitive. It is true that last year's system could choke a bit when a large stream of fast errors were being sent to the DS. I don't think those errors would be only camera, but if you had lots of other errors, the camera could contribute to make things even worse.

As for loops causing watchdog issues, it isn't the fact that it is a loop, but the time that the code takes to execute. If the code manipulates a solenoid, a common occurrence last year, they code would often have delays and would cause a watchdog each time it ran. Even worse, it would cause many teleop packets to be overwritten since the teleop handler would take far longer than 20ms to execute.

A printout was inserted deep into the libraries last year to help determine when short disables were occurring. It kept count of the user and system watchdog disables since boot. If these correspond with the robot "power failures", then indeed, the WD was disabling the robot due to a missed deadline. If not, then it was something else.

Greg McKaskle
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
[FTC]: Common failures with TETRIX PhilBot FIRST Tech Challenge 20 25-10-2012 23:19
Your Successful Failures ? ebarker General Forum 0 03-11-2009 13:20
Last Minute Programming Failures robobrain0101 Programming 3 11-02-2007 14:30


All times are GMT -5. The time now is 03:23.

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