how to remove deployed code?

I deployed my code and verified that it runs at startup. Now I want to take it off (it was only test code) and go back to developing my application.

Do I have to re-image the cRIO? Or is there a smarter way?

Deploying new code will overwrite the old code, no need to delete it.

just run as startup your new code.

Does Re-imaging the cRIO delete everything that was stored in it?

Yes, this does remove stored code, but I was looking for a less extreme method. I know I can overwrite my built and deployed code, but that is not what I am looking for.

If I run code on a “blank” cRIO, the code is transient, and disappears when I power down the bot. That it the state I would like to return to. I want to see that red “No Robot Code” light when I power up the bot.

Anyone know how to do this (aside from using the No App switch)??

You’ve piqued my curiosity now. Why would you want to do this? What does this accomplish that overwriting doesn’t?

ftp to the cRIO and delete the file:C:
i-rt\startup\startup.rtexe

If you check the Properties of your Build Specification, these details are on the first page. Target Destination Directory
Target filename

I too would like to know why you want to do this? Is this to prevent “bad code” from running accidently?

I believe the “Unset as startup” will do what you want.

Greg McKaskle

I wasn’t sure which would win in the conflict with the cRIO Imaging Tool’s:“Always run deployed code at startup” Does Unset actually move the executable out of the startup directory?

That is a good question. I believe the Always run feature looks in the same directory for something called StartUp…backup. I’m not sure I’ll find time to test what the Set and Unset do, but I thought the change was to the ini file.

Greg McKaskle

I was able to test tonight and Unset doesn’t appear to do or affect anything any longer for our FRC application (if the cRIO Imaging’s “Always run deployed code at startup” has been set).
I know it worked in 2009 before the cRIO Imaging addition, but was disabled soon after.
It toggles, but the code still starts and I didn’t find any .ini file changes.

So the override insures that if code is there it will run under any circumstances.

Yes, but that is not the main reason. In development, I just want to download the code, I don’t want to build it and then download it. If you do it this way, the front panel to the code is “live” on your computer, and you can change the value of controls (and therefore tune your program) without having to stop the program or re-download. It saves a lot of time… You can do this on top of code that has been “saved as startup”, but then you have to click through some annoying dialog about VIs with the same name being replaced.

Ah. You can prevent code from running automatically by unchecking “always run code on startup” in the cRIO reimaging tool.
(When you deploy code as startup, it is startup. When you do a temporary deployment, it unsets that other code as startup. The “always run code on startup” searches for something called “startup.rtexe” if there is no code set as startup.)