Log in

View Full Version : FRC 2013 No Robot Code


chriz4gx
14-01-2013, 17:26
So I recently imaged our teams FRC Crio. I imaged it and it was successful. I then wrote a small Labview code and deployed it to the Crio. But then when I connected the Crio to the Driver Station via Ethernet I only got a green indicator for Communication and Joystick, but a red Indicator for Robot Code. I cant figure out to fix this problem. Any help will by greatly appreciated :). Thxs!

Mark McLeod
14-01-2013, 17:55
How did you deploy your code to the cRIO?

It should have been:

Right-click on Build Specifications -> FRC Robot Boot-up Deployment
Choose Build (will take a minute)

When that's done
Right-click on Build Specifications -> FRC Robot Boot-up Deployment
Choose Run as startup (it gets transferred to the cRIO)
Answer OK to questions.

chriz4gx
14-01-2013, 18:17
What I did was that I just right clicked on Build Specifications and then Build All. Thxs for the help, will definitely try your steps tomorrow thank you so much.

Wildcats1378
15-01-2013, 02:16
You can also just run it from Robot Main. Don't HAVE to run as startup.

lorem3k
15-01-2013, 03:25
You can also just run it from Robot Main. Don't HAVE to run as startup.
Just to clarify, this is better for testing (we do this all through build season), but when you're at competition, you'll have to run your code as startup. We usually don't build and deploy it permanently until bag&tag day.

jcbc
15-01-2013, 08:12
Since installing the new LabVIEW version, our programmers seem to have found that you can no longer choose to just Deploy the robot code. The only way we've gotten the Driver Station Robot Code light to be on is to use Run as Startup when deploying code.

Tom Line
15-01-2013, 08:14
Since installing the new LabVIEW version, our programmers seem to have found that you can no longer choose to just Deploy the robot code. The only way we've gotten the Driver Station Robot Code light to be on is to use Run as Startup when deploying code.

To temporarily run the code on the cRIO, open robot main and click the run arrow and wait for it to deploy. This code will be removed on a reboot. If you stop the code using the stop-sign or the finish button, you will need to go back and click the arrow to re-deploy.

To permanently transfer the code to the robot and have it stay there, follow Mark's instructions to compile and then Run as Startup on the cRIO.

Alan Anderson
15-01-2013, 08:24
Since installing the new LabVIEW version, our programmers seem to have found that you can no longer choose to just Deploy the robot code. The only way we've gotten the Driver Station Robot Code light to be on is to use Run as Startup when deploying code.

There's a checkbox on the cRIO Imaging Tool screen that tells the system to "always run deployed code". If that wasn't selected, then a simple Deploy won't result in the code being run.

jcbc
15-01-2013, 09:16
There's a checkbox on the cRIO Imaging Tool screen that tells the system to "always run deployed code". If that wasn't selected, then a simple Deploy won't result in the code being run.

Thanks! That has to be what is going on. I don't remember whether that box was checked when the programmers imaged the cRIO. I'll have them check and re-image if necessary.

Keyreaper
15-01-2013, 13:51
Are you still required to build the project if you have the cRIO set to run deployed code on startup?

Mark McLeod
15-01-2013, 14:06
All new code must be Built before transferring it to the robot permanently. It doesn't have to be Built at any other time. LV will tell you whenever it needs to be Built.
You don't have to build it if running in debug mode, or not transferring it to the robot.

Alan Anderson
15-01-2013, 15:10
Running Robot Main will copy all the necessary VIs to the cRIO's RAM and execute everything there. It does not save anything to the cRIO's flash memory, so the next time the cRIO boots up it will run whatever it had stored previously. It's useful for testing and tweaking and debugging, but it doesn't survive a reboot.

Choosing Build compiles all the project's VIs into a real-time executable file that the cRIO knows how to run. It doesn't put that file anywhere on the cRIO, though. You can do it even if your cRIO isn't connected.

Choosing Deploy copies into the cRIO's flash memory whatever real-time executable file was most recently built. It doesn't explicitly set that file to be run when the cRIO boots up, but if you've imaged the cRIO with the "always run deployed code" option set the file will be run anyway.

Choosing Run as startup copies the real-time executable file to the cRIO's flash memory and sets things up so that the file will be run when the cRIO boots up.

There's no good reason to use Deploy. Get in the habit of always doing Build followed by Run as startup when you want to put a program on the cRIO.

Bruno#1382
15-01-2013, 17:22
you can try to reboot the cRio via driver station we try this and it works

Keyreaper
15-01-2013, 23:20
There's no good reason to use Deploy. Get in the habit of always doing Build followed by Run as startup when you want to put a program on the cRIO.

Thanks for the clarification Alan. I have always used the Build > Run as Startup method. Just didn't know you could deploy it in a different manner.