Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Consistent robot flicker every 64 seconds (http://www.chiefdelphi.com/forums/showthread.php?t=126946)

William Kunkel 20-02-2014 18:25

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?

Mark McLeod 20-02-2014 18:35

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)?

William Kunkel 20-02-2014 18:56

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).

joelg236 20-02-2014 18:56

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?)

Deetman 20-02-2014 21:07

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.

Jared Russell 20-02-2014 21:33

Re: Consistent robot flicker every 64 seconds
 
What language are you using?

Could be garbage collection.

geomapguy 20-02-2014 21:37

Re: Consistent robot flicker every 64 seconds
 
Quote:

Originally Posted by Jared Russell (Post 1347243)
What language are you using?

Could be garbage collection.

I think C++

Quote:

Wind River

k4mc 20-02-2014 22:08

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.

Jared Russell 20-02-2014 22:32

Re: Consistent robot flicker every 64 seconds
 
Do you happen to have a 16-bit unsigned int that is counting milliseconds?

Greg McKaskle 21-02-2014 07:08

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

E Dawg 21-02-2014 09:30

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).

MamaSpoldi 21-02-2014 10:26

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.

William Kunkel 21-02-2014 10:53

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.

PandaHatMan 21-02-2014 11:05

Re: Consistent robot flicker every 64 seconds
 
Where is your D-Link on your robot? Is it close to any noisy circuits?

William Kunkel 21-02-2014 11:16

Re: Consistent robot flicker every 64 seconds
 
Our D-link is pretty isolated. I don't think it's the problem.


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

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