Go to Post resist the hive: As goofy as this may sound, wires do take up weight, several pounds of it. - Rickertsen2 [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 14-10-2011, 20:59
Beave Beave is offline
Registered User
AKA: Sherman
FRC #1293 (D5 Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: South Carolina
Posts: 8
Beave is an unknown quantity at this point
The Unfortunate Lack of Robot Code

I am the programming head for my team, and I recently deployed updated code to the robot in preparation for SCRIW (local competition in SC) this upcoming week. Everything went well aside from the fact that half of the control system was wired incorrectly... so I had to fix that. After adding a few random things that I forgot (like values for the joystick button constants) and deploying a second time, the driver station was showing that it had "Communications" but no "Robot Code," and as far as I could tell the code had deployed correctly.

In all honesty, this is probably due to having forgotten some little thing which I just haven't thought of. But regardless, I am simply curious if another team has encountered a similar error, and/or if anyone has additional suggestions.
  #2   Spotlight this post!  
Unread 14-10-2011, 22:14
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
Re: The Unfortunate Lack of Robot Code

There are a few places I've seen this. The first would be when Debugging using java you need to connect to the debugger before it will run Robot Code. By far the most common reason for this is something went wrong with the Deploy eg The network cable came out during the upload or for some reason the compiled image that is sent to the cRIO is corrupt. I believe that exceptions in C++ may also cause the Robot Code to stop running. If I remember correctly when things are working correctly the Robot sends a heartbeat saying Robot Code is running. If there is an exception that may crash the code to the point where the heartbeat is no longer sent.

In C++ good places to look are "unresolved symbols", basically things declared in headers that aren't in implementation files. I believe that unless you are debugging the code won't run if you have unresolved symbols.

As a rule a good place to look for exceptions is anywhere that you may be using an index as those can result in index out of bounds errors.

Another good thing to do is keep the NetConsole for the cRIO open. This will tell you what is going on, for example if the Program that you uploaded is corrupt it will say something along the lines of "Could not load FRCUserProgram"

Good Luck!!
  #3   Spotlight this post!  
Unread 15-10-2011, 02:38
Chexposito's Avatar
Chexposito Chexposito is offline
Registered User
AKA: Expo
FRC #1730
Team Role: Alumni
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Missouri
Posts: 272
Chexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of light
Re: The Unfortunate Lack of Robot Code

Usually a good power cycle will fix most problems. The robot will have coms but no code if it sits there for too long without use. But again, try resetting the robot before you get too ambitious
  #4   Spotlight this post!  
Unread 24-10-2011, 20:28
Beave Beave is offline
Registered User
AKA: Sherman
FRC #1293 (D5 Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: South Carolina
Posts: 8
Beave is an unknown quantity at this point
Re: The Unfortunate Lack of Robot Code

Thank you all for the input, I applied what you all said such as getting rid of unused variables and potential exceptions, but the problem remains. Just to clarify, I am using C++ on WindRiver with VxWorks, and I am not using any debugging tool.

I was able to FTP to the robot via Windows Explorer, and I tried simply replacing FRC_UserProgram.out, but this didn't seem to help anything. But the fact that the output file is there suggests that it's either somehow corrupt or there is an issue with the network.

Does anyone know if there is a more involved process to replacing code via FTP than simply replacing the file? I would imagine there would be what with all of the other files stored. Thanks again for any feedback!
  #5   Spotlight this post!  
Unread 24-10-2011, 22:12
Eric Caldwell Eric Caldwell is offline
Registered User
FRC #0254
 
Join Date: Apr 2011
Location: United States
Posts: 4
Eric Caldwell will become famous soon enough
Re: The Unfortunate Lack of Robot Code

My team was having this problem a week ago, and re-imaging the crio fixed the problem for us.
  #6   Spotlight this post!  
Unread 24-10-2011, 22:17
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
Re: The Unfortunate Lack of Robot Code

Quote:
Originally Posted by Eric Caldwell View Post
My team was having this problem a week ago, and re-imaging the crio fixed the problem for us.
That would definitely be what I would try. You may also want to check and make sure that the NO APP (and similar) DIP Switches are not set to on. The DIP switches are the things being pointed to in this image.

Good luck
Oliver
  #7   Spotlight this post!  
Unread 26-10-2011, 20:33
Beave Beave is offline
Registered User
AKA: Sherman
FRC #1293 (D5 Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: South Carolina
Posts: 8
Beave is an unknown quantity at this point
Re: The Unfortunate Lack of Robot Code

Thanks again, the NO APP switch is off.

is there a specific process to reimaging the cRIO beyond just pressing the reset button and/or extracting the latest image via FTP? I have read about a "cRIO Imaging Tool," but apparently that requires LabVIEW, and, characteristic of our team, I can not find the installation disk from last year's KoP. Any further suggestions?
  #8   Spotlight this post!  
Unread 26-10-2011, 20:40
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,753
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: The Unfortunate Lack of Robot Code

The imaging tool was written in LV, but that is irrelevant. If the tool is installed on the computer, it will run independently. I'm not positive, but I believe you will find the tools in the Start menu >> National Instruments>>"not sure" >> FRC cRIO Imaging Tool.

If you don't find it there, look in the installed SW tools to see what is there from National Instruments.

Greg McKaskle
  #9   Spotlight this post!  
Unread 26-10-2011, 23:28
linuxboy linuxboy is offline
Registered User
AKA: Oliver Graff
FRC #3780
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: MI, USA
Posts: 217
linuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud oflinuxboy has much to be proud of
Re: The Unfortunate Lack of Robot Code

I'm fairly certain the cRIO imaging tool requires the LabView runtimes that come on the LabView disk teams get at kickoff (in the "Install FRC tools and utilities option). There is a way to download those run times but I wouldn't suggest doing that. If you have access to the Classmate that should have the imaging tool and the runtimes on it. Make sure to do all the Utilities updates available that aren't already installed on your classmate.
  #10   Spotlight this post!  
Unread 27-10-2011, 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,753
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: The Unfortunate Lack of Robot Code

Yes. I should have said that better. Be sure to install the imaging tool, as that will include the dependencies such as the LabVIEW runtime DLLs. If you copy it to a computer, it will not run successfully.

Greg McKaskle
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 18:59.

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