FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO/LabVIEW settings to automatically load code when powered on

Solved!
Go to solution

We have a robot which always needs us to always load the labVIEW code manually when powered ON. I know there are settings in the LabVIEW project code which one can do to automatically load the last code which was downloaded and ready to go when powered ON. Do anybody know what these settings are? Also, are there additional hardware settings on the cRIO side to make this work? I will greatly appreciate any help on this.

Thanks.

0 Kudos
Message 1 of 6
(6,077 Views)

You need to do two things:

1. In the cRIO imaging tool: make sure that the checkbox "Always run deployed code at startup” is selected.

You can set this without reformatting the controller.

2. In Labview, with the project open, right click on the target and use "run on startup" to build and deploy the project to the robot.

A 'reset' of the cRIO should now start the program running. If it doesn't make sure that the software switches are all off on the cRIO_II

and the dip switches on the 8-slot cRIO are all off. One of them prevents the deplayed program from running.

Cheers.

Message 2 of 6
(3,491 Views)

AndrewN,

Thanks for the prompt response. The number "1" item above is done. When it comes to the second item, I could not find the command "run on startup" with a right-click on the RT CompactRIO Target. I then did a right-click on the Robot Main.vi and also I could not find the command "run on startup". We are using the 8-slot cRIO. Are we missing something? Thanks.

0 Kudos
Message 3 of 6
(3,491 Views)
Solution
Accepted by topic author YEMO

On the Project Explorer window, when you've expanded the RT CompactRIO Target, you will see "Build Specifications."

Expand that and under it you will see "FRC Robot Boot-up Deployment," that's the default name.

Right-click on that and the menu has:

1)  "Build" you do this first to compile your code

2) "Run as startup" do this second to download it to the cRIO ready for action

Here's a screen shot of the menu: http://www.chiefdelphi.com/forums/attachment.php?attachmentid=9721&d=1295370058

0 Kudos
Message 4 of 6
(3,491 Views)

Thanks MarkMcleod for the detailed instruction on how to get to the "run on startup" command. Also thanks to AndrewN for the steps to get this problem solved. Everything is working fine now!

MarkMcleod, I have one last question: Are these two steps i.e., "Build" and then "Run as startup" you stated in your reply a one time process or will I need to repeat this two steps anytime I make changes in my LabVIEW code?

Thanks so much for the help.

0 Kudos
Message 5 of 6
(3,491 Views)

We need to do both steps (Build then Run as startup) whenever you want to put new changes made to the code onto the robot permanently.

If you make code changes and hit Run as startup without Build, then LabVIEW will stop and telll you you need to Build first.

If you haven't made any changes from the last Run as startup, then you don't have to do these steps. the old code will still be on the robot ready to go.

When testing changes that aren't quite ready to be made permanent, then do what you were doing before and the modified code is only temporary.

That way you can take your time working through bugs, and if you need the robot for a demo or match, then cycling the power will revert to the last code loaded by Run as startup ready to go.

Message 6 of 6
(3,491 Views)