Go to Post FIRST may very well be the healthiest drug on the market. - Herodotus [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 28-02-2012, 19:28
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Driver Station No Robot Code Light Blinking

Hi Chief Delphi.

During the testing of our robot, I found out that when our robot is enabled from the Driver Station for about 1-2 minutes, it tells us that there is no robot code momentarily. This then happens at intervals of time that get smaller and smaller until eventually the Driver Station reports that communications with the robot has ceased. Sometimes though, after communications have supposedly ceased, when we leave our electronics on, the Driver Station will report that it detects its connection with our cRIO and has robot code but then quickly goes back to its no communication state.

While having the robot in operation, whenever this error appears, the state of our robot freezes. For example, if we were spinning a motor and this error came up, without input from our joystick, the motor would still spin until communications have been detected again.

This has occurred in completely different sets of hardware (different cRIOs, victors, modules, etc.). We tried different batteries (fully charged). This occurs both tethered to our laptop and through our wireless bridge.

I am programming in Java and use NetBeans as our IDE. I am using the supplied Command Based Robot Template. It seems that it is a problem with our code because with other sample code that I loaded into our robot, this problem does not occur. Another oddity is that when I tried to print out the state of our robot in the NetConsole, whether its in teleopInit, disabledPeriodic, etc., I found that when the Driver Station reported no communications with the cRIO, it still went through the disabledPeriodic/Continuous states.

I plan to meticulously, through trial and error remove certain aspects of my code to see what's causing the error. I was wondering though if anyone ever encountered something like this and if they could give any insight as to what is causing this. I've attached my code if it helps in any way. It is very outdated though with poor "grammar" because I could not reach my code which is on a laptop at school right now.
Attached Files
File Type: zip LancerBot.zip (62.6 KB, 13 views)
  #2   Spotlight this post!  
Unread 28-02-2012, 19:31
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,600
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: Driver Station No Robot Code Light Blinking

Does the charts tab in the DS show any trends such as increasing CPU usage or increasing memory usage over time?
  #3   Spotlight this post!  
Unread 28-02-2012, 19:59
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

I do not think so. I monitored Windows Task Manager's report on CPU Usage / Memory and they were stable throughout the whole time during one time I observed this error. However I will monitor it more thoroughly during my continued trials of this.
  #4   Spotlight this post!  
Unread 28-02-2012, 20:07
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 992
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Driver Station No Robot Code Light Blinking

Quote:
Originally Posted by Eric Lam View Post
I do not think so. I monitored Windows Task Manager's report on CPU Usage / Memory and they were stable throughout the whole time during one time I observed this error. However I will monitor it more thoroughly during my continued trials of this.
The Charts tab shows cRIO CPU and memory. Task Manager shows your DS computer's CPU and memory.
  #5   Spotlight this post!  
Unread 28-02-2012, 20:11
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

Ah, I see. Thank you for that. I will monitor that tomorrow when I can get to our equipment and test it out and hopefully I'll be able to find a clue for our problem.
  #6   Spotlight this post!  
Unread 28-02-2012, 20:18
kjohnson's Avatar
kjohnson kjohnson is offline
Insert Clever Title Here
AKA: Kyle J.
FRC #1610 (BOT)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Virginia
Posts: 575
kjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond reputekjohnson has a reputation beyond repute
Re: Driver Station No Robot Code Light Blinking

Joe is specifically referring to the Charts tab of the Driver Station software, not necessarily the laptop's task manager. Windows Task Manager will show you the computer's CPU and memory usage, but the Charts tab of the DS will show you actual cRIO CPU usage.

You can go to Program Files > FRC Driver Station > Driver Station Log File Viewer.exe and review the log of the same display shown in the Charts tab of the DS.
  #7   Spotlight this post!  
Unread 29-02-2012, 11:04
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

I've just run through a few test while monitoring the charts on the Driver Station and there does not seem to be anything out of the ordinary. All data is consistent in the states where our robot is enabled and disabled.
  #8   Spotlight this post!  
Unread 29-02-2012, 11:54
jspatz1's Avatar
jspatz1 jspatz1 is offline
Registered User
AKA: Jeff
FRC #1986 (Team Titanium)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Lee's Summit, MO
Posts: 836
jspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond repute
Send a message via AIM to jspatz1
Re: Driver Station No Robot Code Light Blinking

We have been plagued by a similar problem and finally isolated the cause as being power noise from the voltage adapter to the wireless bridge. The adapter can have noise of its own, but we believe it is also originating from the compressor motor. We installed a 220 uF capacitor across the power leads between the voltage adapter and the bridge, and also across the power leads to the compressor. This seems to have solved the problem. Make note of whether the problem occurs mostly when the compressor is running. Power up with the air system fully charged so the compressor does not run, then drain the pressure and power up again with the compressor running, and see if there is a difference.
__________________
  #9   Spotlight this post!  
Unread 29-02-2012, 12:47
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,745
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Driver Station No Robot Code Light Blinking

If you think it's a problem that's associated with the wireless bridge, the best and most certain way to troubleshoot that is to plug the DS directly into the cRIO and see if the problem occurs. If it doesn't, you can be highly suspicious of the bridge. If the problem still occurs, then it's highly unlikely that it's the bridge. I don't think randomly sprinkling capacitors around is good first step for troubleshooting. But then, I prefer rifles to shotguns for troubleshooting problems.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter

Last edited by Kevin Sevcik : 29-02-2012 at 12:49.
  #10   Spotlight this post!  
Unread 29-02-2012, 15:47
jspatz1's Avatar
jspatz1 jspatz1 is offline
Registered User
AKA: Jeff
FRC #1986 (Team Titanium)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Lee's Summit, MO
Posts: 836
jspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond reputejspatz1 has a reputation beyond repute
Send a message via AIM to jspatz1
Re: Driver Station No Robot Code Light Blinking

I don't believe I indicated that the capacitors were randomly sprinkled, nor a first step. They were an effective solution that the solved the problem after many other possibilities were explored. The solution is offered with the chance that another team with the same problem might benefit from it.
__________________
  #11   Spotlight this post!  
Unread 29-02-2012, 20:49
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

Hey guys. Thanks for all the replies. Through many trials of commenting out sections of my code though, I found out that the following line was to blame for:

SmartDashboard.putData("Scheduler Data" , Scheduler.getInstance());

I'm not too sure why though. This is the first year we are using the SmartDashboard and everything else related to it works.

Thanks for all advice.
  #12   Spotlight this post!  
Unread 03-03-2012, 08:47
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: Driver Station No Robot Code Light Blinking

The Robot Code light on the DS is controlled by the arrival of info from the robot in the status packets. If the robot code is running slower and slower, it will eventually start to miss status timeouts and the light will flicker. If it stops sending them all-together the light will stay red.

So, I'm not sure what was/is causing it, but I suspect that your code, or more precisely the FRC_Communications task on your cRIO was running slower and slower due to low-memory or task overhead.

Greg McKaskle
  #13   Spotlight this post!  
Unread 03-03-2012, 10:50
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

Me and a couple of my teammates were thinking about that Greg, which is why I think the line

SmartDashboard.putData("Scheduler Data" , Scheduler.getInstance());

seems to slow down the robot. I have also recently discovered that when I use a SendablePIDController and use SmartDashboard.putData with it, the same bug comes up.
  #14   Spotlight this post!  
Unread 03-03-2012, 13:03
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: Driver Station No Robot Code Light Blinking

Can you test whether even more SmartDashboard updates causes the CPU to rise even faster? Can you show that the CPU doesn't rise when the SmartDashboard is not used? Anything can have a bug in it, including the SmartDashboard, but it would be nice to get to the bottom of it.

Greg McKaskle
  #15   Spotlight this post!  
Unread 03-03-2012, 20:23
Eric Lam Eric Lam is offline
Registered User
FRC #0321
 
Join Date: Feb 2012
Location: Philadelphia, PA
Posts: 8
Eric Lam is an unknown quantity at this point
Re: Driver Station No Robot Code Light Blinking

According to the Driver Station's charts, CPU usage stays at a consistent rate whether SmartDashboard is being updated or not. I plan to check out if this problem occurs on our Classmate just in case though to see if we can eliminate some problems.
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 01:42.

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