Go to Post I don't care if you use hot dogs for wheels. If you're scoring points, and you fit the strategy, it's fine. - evanperryg [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-02-2009, 21:30
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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!
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2009, 23:11
drewDabb's Avatar
drewDabb drewDabb is offline
Registered User
AKA: Drew
FRC #1089 (Mercury)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: East Windsor-Highstown
Posts: 6
drewDabb is an unknown quantity at this point
Send a message via AIM to drewDabb Send a message via Yahoo to drewDabb
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2009, 23:15
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2009, 10:01
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2009, 16:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2009, 22:04
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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.
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 06-02-2009, 22:47
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
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...
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2009, 15:10
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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
__________________
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2009, 15:49
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #10   Spotlight this post!  
Unread 07-02-2009, 19:13
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 07-02-2009, 21:11
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Reboot robot every download?

Quote:
Originally Posted by lostkhaos View Post
When I say it does not execute, I mean that there is no error returned, yet Main.vi insists that it is running.
That sounds like it is running. What makes you think it isn't?
Reply With Quote
  #12   Spotlight this post!  
Unread 07-02-2009, 21:14
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
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.
__________________
Reply With Quote
  #13   Spotlight this post!  
Unread 07-02-2009, 21:15
TimeOut's Avatar
TimeOut TimeOut is offline
Registered User
AKA: Sean Kelly
FRC #0499 (The Toltechs)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: San Antonio, TX
Posts: 50
TimeOut is on a distinguished road
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
Reply With Quote
  #14   Spotlight this post!  
Unread 07-02-2009, 21:23
lostkhaos lostkhaos is offline
Registered User
FRC #1307
 
Join Date: Jan 2009
Location: NH
Posts: 16
lostkhaos is an unknown quantity at this point
Re: Reboot robot every download?

Large 'Finish' button? I don't have one, how would I add one?
__________________
Reply With Quote
  #15   Spotlight this post!  
Unread 07-02-2009, 21:31
TimeOut's Avatar
TimeOut TimeOut is offline
Registered User
AKA: Sean Kelly
FRC #0499 (The Toltechs)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: San Antonio, TX
Posts: 50
TimeOut is on a distinguished road
Re: Reboot robot every download?

I'm sorry, the 'Finish' button is in the Advanced Framework and it sounds like you are running the Basic Framework. That goes along with there not being a finish.vi. (Edit: Meaning, that this is probably not the problem)

When you hit the run button the second time, open the block diagram for Robot Main.vi and press the 'light bulb' on the tool bar. Do you see it highlighting the execution through your TeleOp Execute?

You may also want to try to put a probe on one of the joystick axis just to see if it's reading the joysticks.

Sean
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 21:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi