Go to Post "I don't need an anniversary party. Use the money for the kids on the robotics team."- Walter Suchowiecki, BMS technician - Wayne C. [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 20-02-2014, 18:25
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Consistent robot flicker every 64 seconds

We noticed a really odd problem with the robot when we started doing full testing. Every 64 seconds, the robot "flickers" for a fraction of a second. Relays (and possibly PWMs) shift into neutral, as well as solenoid valves. There is an audible clicking from the solenoid valves and almost every light on the robot goes out. However, we don't lose communications, and everything is back to normal a split second later. Still, the behavior is very disconcerting, and we can't see any obvious explanation for it. Before I get into trying to flowchart the code to see if anything is illuminated, is anyone aware of any sort of loops in WPILib that run on a 64-second timer?
  #2   Spotlight this post!  
Unread 20-02-2014, 18:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,900
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Consistent robot flicker every 64 seconds

Does anything show up in the DS log when this happens?

Have you substituted a different computer as the Driver Station in case it's a Windows task popping up every 64 seconds (which I have seen before)?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 20-02-2014, 18:56
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Consistent robot flicker every 64 seconds

There's nothing on the DS. And we tried deploying just the simple robot template provided by Wind River, which removed the problem, so I think we can rule out the computer (probably).
  #4   Spotlight this post!  
Unread 20-02-2014, 18:56
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Consistent robot flicker every 64 seconds

We've had something similar happen, although it seems much less consistent (ie. could be 10 or 50 seconds). I've put it up to lag, although I've had a sneaking suspicion that it isn't. (how could it be even?)
__________________
All opinions are my own.
  #5   Spotlight this post!  
Unread 20-02-2014, 21:07
Deetman Deetman is offline
Registered User
AKA: Kevin Dieterle
no team
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Philadelphia, PA
Posts: 203
Deetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond repute
Re: Consistent robot flicker every 64 seconds

I spent a considerable amount of time troubleshooting with a team at their build site where they were disconnecting over WiFi every 6 seconds, no matter what code was on the robot. Ended up being something with the driver station laptop and swapping it fixed the issue.

Can you post your driver station log file and a screenshot of it? It really is one of the most important pieces to tracking down issues. If you don't know how to get to it, go to the "Charts" tab on the driver station interface and then click the "Launch viewer" button in the bottom right.
__________________

FIRST Mid-Atlantic Volunteer (2012-present)
Team 1014 Alumni (2004-2005)
Team 1712 Mentor (2011-2015)
  #6   Spotlight this post!  
Unread 20-02-2014, 21:33
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,082
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: Consistent robot flicker every 64 seconds

What language are you using?

Could be garbage collection.
  #7   Spotlight this post!  
Unread 20-02-2014, 21:37
geomapguy's Avatar
geomapguy geomapguy is offline
Centenary '18
AKA: Graham Maxwell
FRC #1818
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Alexandria, LA
Posts: 535
geomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud of
Re: Consistent robot flicker every 64 seconds

Quote:
Originally Posted by Jared Russell View Post
What language are you using?

Could be garbage collection.
I think C++

Quote:
Wind River
__________________
The Cowboys - FIRST Robotics Team #1818 2015-
The Bolton Bear Bots - FIRST Robotics Team #3666 2011-204 (30-26-0)
2014 Oklahoma Regional - 20/62 (6-4-0), 5/62 in OPR
2014 Arkansas Regional - 14/39 (8-7-0, Quarterfinalists with 1706 and 1939), 24/39 in OPR
2013 Lone Star Regional Dean's List Finalist!
2013 Lone Star Regional - 22/57 (6-5-0), 17/57 in OPR
2012 Bayou Regional - 16/49 (6-5-0)
2011 Dallas Regional - 10/52 (4-2-5, #6 Alliance Captain, Quarterfinalists with 2948 and 3350)
  #8   Spotlight this post!  
Unread 20-02-2014, 22:08
k4mc k4mc is offline
Registered User
AKA: Kushal
FRC #0955 (CV Robotics)
Team Role: Alumni
 
Join Date: Dec 2012
Rookie Year: 2009
Location: Oregon
Posts: 4
k4mc is an unknown quantity at this point
Re: Consistent robot flicker every 64 seconds

Perhaps you have a memory leak that is causing the processor on the cRIO to reset every 64 seconds? That would explain why you don't loose communication but everything else resets and could be likely given C++ doesn't have a garbage collector.

You could at least easily test if this is the issue by downloading sample code onto the bot and waiting 64 seconds.

Edit: I just noticed you said that sample code removes the problem, so I now highly suspect something in your code is periodically crashing. If its not a memory leak, you could try first uploading an empty file and slowly adding one class/file/functionality at a time to see which part is causing the crash.

Last edited by k4mc : 20-02-2014 at 22:14.
  #9   Spotlight this post!  
Unread 20-02-2014, 22:32
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,082
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: Consistent robot flicker every 64 seconds

Do you happen to have a 16-bit unsigned int that is counting milliseconds?
  #10   Spotlight this post!  
Unread 21-02-2014, 07:08
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,756
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: Consistent robot flicker every 64 seconds

If the flicker is short, this isn't caused by a crash or reboot. I agree with Jared that something in the code is probably overflowing.

Greg McKaskle
  #11   Spotlight this post!  
Unread 21-02-2014, 09:30
E Dawg E Dawg is offline
... is not done with FRC yet.
AKA: Ethan
FRC #0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Feb 2013
Rookie Year: 2012
Location: Fort Collins, CO
Posts: 267
E Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud ofE Dawg has much to be proud of
Re: Consistent robot flicker every 64 seconds

I concur with the above. Go through your code and make sure that there are no overflow warnings (hopefully WindRiver alerts you to that).
  #12   Spotlight this post!  
Unread 21-02-2014, 10:26
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Consistent robot flicker every 64 seconds

Check the NetConsole output. There could be helpful messages being printed there that could point you in the right direction.
__________________
  #13   Spotlight this post!  
Unread 21-02-2014, 10:53
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Consistent robot flicker every 64 seconds

Sorry for not responding quickly. We're using C++, and I'm compiling with -Wall -pedantic -Wextra and not getting any warnings or errors. I agree that it's probably an overflow error of some sort, but 64 seconds seemed like such a specific number that I was hoping it might be something in WPILib. There is no output over netconsole. Looking at the DS Log Viewer, there seem to be spikes in dropped packets that correspond to the flickering.
  #14   Spotlight this post!  
Unread 21-02-2014, 11:05
PandaHatMan's Avatar
PandaHatMan PandaHatMan is offline
Registered User
AKA: Wallpe
FRC #1747 (Harrison Boiler Robotics)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2011
Location: United States
Posts: 39
PandaHatMan is an unknown quantity at this point
Re: Consistent robot flicker every 64 seconds

Where is your D-Link on your robot? Is it close to any noisy circuits?
  #15   Spotlight this post!  
Unread 21-02-2014, 11:16
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Consistent robot flicker every 64 seconds

Our D-link is pretty isolated. I don't think it's the problem.
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 11:12.

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