cRIO has no code

hello,

I tried to download my C++ code to the cRIO and I got error message. After that, I turn on the cRIO and on the driver station was written “battery: no code”. What should I do to fix the problem?

thank you,
team 1937

Are you using the default code? If not, then you need to make sure you make a call to START_ROBOT_CLASS() or something of similar name. Otherwise the cRIO doesn’t know which file to use as a robot class.

Hey, I don’t really have an answer for you, but I just want to say that I’ve been using LabVIEW and I have the same problem. I think that you might have to go into your code and actually put in a call to update the Driver Station with the battery voltage. I haven’t looked into it yet but I believe that there is a function (or subVI for LabVIEW) for retrieving the battery voltage, and one for sending that to the Driver Station.

Hope this helps!

Not too sure about the LabView API, but C++ should do that automatically provided you put the jumper on the analog breakout.

I believe both environments will do that if you start with a template.

Greg McKaskle

When you debug code of the robot it is not stored permanently, so when you reset it there is no user code. I’m guessing this is what happened.

Make sure that you’ve read and understand pages 20-26 of the C/C++ Programming Guide.

You may be having a different issue, but without more detail about the error message I can’t know.

The battery voltage monitoring and reporting code is located in the WPILib code, so unless you’re running a modified version then it should report a voltage. Even if you broke that part of the code it would report 0.0 volts not NO CODE.

No code can mean you have unresolved symbols in your program. See:


for more details.

Best way to diagnose is to hook up serial console as detailed in the control system manual. Watch the console as the cRIO boots.

If you have configured program debugging, you can undeploy, reboot, then load your code through the debugging mechanism. This will tell you right away if you have unresolved symbols (and what they are). You can also look at a console this way (right click remote target, Target Tools, Console)

We’ve found that the DS needs to be set to “disabled” in order for the code update to take, and that usually works.

Best of Luck!
-Blair