|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Reboot robot every download?
When I use LabVIEW, I have to reboot the robot (via power cycle) in order to get the code to function. If I don't, the code does nothing at all. Re-imaging the robot makes no difference as well. Any links to other posts that I've missed or any ideas? Thanks in advance!
|
|
#2
|
||||
|
||||
|
Re: Reboot robot every download?
I'm new to LabVIEW, but I hope what I say will help.
From what I've learned: *Re-imaging is used to update the cRIO, I don't believe it effects the code, besides deleting any on the cRIO. *If you have put a "build" on your cRIO and then "set as startup", that code will be usable until you do a "run" on it. Once you do a "run", you will have to reboot your cRIO to get that permanent code (the "build") to run again. *You can do multiple runs I hope that helps. I'm not sure if the problem is really a technical one, or just something that you weren't sure on, So if what I said doesn't help, it would be great if you could elaborate further. Like I said, I'm new so I'm sorry if I'm mistaken in anything I said. Please feel free to correct me, if so. ![]() |
|
#3
|
|||
|
|||
|
Re: Reboot robot every download?
If you would like to run it interactively and be able to see values change and turn highlighting/debugging on, you should be able to just press the run button at the top level vi (e.g. Basic Robot Main.vi), and assuming that you have targeted the cRIO, the code should deploy temporarily without rebooting.
The FRC Programming Guide.pdf talks about the three ways of deploying in detail; see page 4-16 (or page 50 in the pdf) entitled Deploying the FRC Robot Project. http://decibel.ni.com/content/docs/DOC-2631 The part you may want to know is entitled Building And Deploying A Stand-Alone Application: Complete the following steps to build the FRC robot project into a stand-alone FRC application and run it on the CompactRIO device at startup. 1. In the Project Explorer window, double-click the FRC Basic Robot Deployment build specification or the FRC Robot Boot-up Deployment build specification under the Build Specifications folder to display the Real-Time Application Properties dialog box. 2. On the Information page, specify a name for the build specification in the Build specification name text box. 3. Specify a name for the application in the Target filename text box. 4. Specify the location on the host computer to which you want to save the stand-alone application in the Local destination directory field. 5. Specify the location on the CompactRIO device to which you want to save the stand-alone application in the Target destination directory field. 6. Select Source Files from the Category list. 7. Verify that the Basic Robot Main VI or the Robot Main VI is in the Startup VIs list. 8. Click the OK button to close the Real-Time Application Properties dialog box. 9. In the Project Explorer window, right-click the build specification and select Build from the shortcut menu to build the application. 10. Right-click the build specification and select Run as startup from the shortcut menu to set the application as the startup application and deploy the application to the CompactRIO device. LabVIEW prompts you to reboot the RT target. 11. Reboot the CompactRIO device to run the application. Note If you no longer want the application to run on the CompactRIO device at startup, right-click the build specification and select Unset as startup from the shortcut menu. |
|
#4
|
|||
|
|||
|
Re: Reboot robot every download?
No no no, I know how to make it deploy-able. My issue is when I deploy code that isn't "installed". The first time it works fine, but if I stop the program and change something, then RE-upload it, it fails to do anything at all. If I reboot the robot, however, I can then upload code which executes beautifully.
|
|
#5
|
|||
|
|||
|
Re: Reboot robot every download?
The typical workflow is to press the run button on your VI, stop edit, press run, ... , until your code is perfect.
Once you are happy, you then build, deploy, and set to run as startup. When you do that, your code runs on startup, stopping it means you need to reboot the controller or use a command line tool to start it. LV doesn't expect startup apps to stop and be restarted. Greg McKaskle |
|
#6
|
|||
|
|||
|
Re: Reboot robot every download?
Let me be as clear as I possibly can. I do not have the code set to run at startup. The code is supposed to be loaded to RAM. The code is not installed. I know my process is correct because it used to work. It no longer does.
|
|
#7
|
|||
|
|||
|
Re: Reboot robot every download?
lostkhaos,
Sorry, we clearly don't understand the work flow that you use. Can you describe for us the procedure that you are actually undertaking and the resulting behavior vs what you intend it to do? e.g. 1. I open the Basic Robot Main project 2. I expand the Build Specifcations 3. I right click on the FRC Basic Robot Deployment and select Deploy 4. The cRIO reboots and executes the code, but... |
|
#8
|
|||
|
|||
|
Re: Reboot robot every download?
1. I turn on the robot
2. I turn on the DS 3. I open my project 4. I open Basic Robot Main.vi 5. I click "Run" 6. The robot code executes normally 7. I click "Abort Execution" 8. I click "Run" 9. The robot code does not execute |
|
#9
|
|||
|
|||
|
Re: Reboot robot every download?
When the robot doesn't execute, what does it do? Do you get an error? Does the Robot Main VI look like it is running?
Early template code didn't do a good job of killing camera and compressor tasks, so that on a restart some stuff would give errors or behave a little funny. Those issues weren't that serious and would normally work, and they have been fixed since update 1 or 2. Please describe better what the run button does and we can figure out what is going on. Greg McKaskle |
|
#10
|
|||
|
|||
|
Re: Reboot robot every download?
Ok, I'm using version 3. When I say it does not execute, I mean that there is no error returned, yet Main.vi insists that it is running. And if I turn off the robot, LabVIEW notices and waits for it to come back.
|
|
#11
|
|||||
|
|||||
|
Re: Reboot robot every download?
That sounds like it is running. What makes you think it isn't?
|
|
#12
|
|||
|
|||
|
Re: Reboot robot every download?
None of my code ends up being executed. For example, my drive train? Nothing. My camera search pattern? Nada. Joystick triggers? Nihil. However, if I reboot the robot and change none of my code, it works like a charm.
|
|
#13
|
||||
|
||||
|
Re: Reboot robot every download?
One note, use the large 'Finish' button in the Robot Main.vi If you press that button it calls the finish.vi and closes all the references. If you press the 'Abort Exectution' button, you could possibly still have stuff open and running on the cRIO. There is quite a bit of code that is running behind the scenes that may not shutdown properly without calling the finish.vi
Sean |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cRIO loses code on reboot? | boris | FRC Control System | 1 | 30-01-2009 10:42 |
| Run Kernel Task w/o reboot | byteit101 | Programming | 4 | 12-01-2009 12:08 |
| 2006 Robot Code Download | Chris_Elston | Programming | 2 | 05-05-2006 10:42 |
| Robot Stats on Every Robot at Championships | SpaceOsc | Scouting | 8 | 13-04-2002 11:55 |
| Robot Stats on Every Robot at Championships | SpaceOsc | Championship Event | 0 | 08-04-2002 19:20 |