|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
Re: The Unfortunate Lack of Robot Code
Quote:
Good luck Oliver |
|
#7
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|