Go to Post All the gangstas in FRC have solid gold CRios. It's called "blingage". If you don't have a solid gold CRio, you're not a straight-up G. :D - Jamie Kalb [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 14-02-2011, 18:04
gordo161101 gordo161101 is offline
Registered User
AKA: G. Lange
FRC #2439 (BHS Robotics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Hawaii
Posts: 4
gordo161101 is an unknown quantity at this point
Deploying stand-alone program on crio.

What is the procedure for creating a stand-alone program on the crio that runs when the crio is booted. LabView provides a procedure to do this in the LabView Environment. Have been unable to find similar procedure for Java. Can someone point me in the right direction or explain how to do it? Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2011, 18:59
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: Deploying stand-alone program on crio.

Do you mean like an Init class?
If so you would do something like this,
Code:
public void RobotInit() {

}
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2011, 20:57
dflaws dflaws is offline
Registered User
FRC #2425 (Hydra)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Tampa, FL
Posts: 6
dflaws is on a distinguished road
Re: Deploying stand-alone program on crio.

When you image the cRIO for java use, the labview software sets up the squawk VM to run your code. Netbeans automatically configures your code for use on the cRIO when you build the code. (F6)
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2011, 09:08
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Deploying stand-alone program on crio.

Gordo,

I'm not sure what you are trying to do.

Are you trying to run your robot app?

Are you trying to run another app in addition to you robot app? If so, why do you want them to be two apps? Can you use Java threads to run them separately? If you really want to get tricky you can run to "Isolates" in Squawk, which are a lot like processes. But that probably isn't really needed.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2011, 13:41
gordo161101 gordo161101 is offline
Registered User
AKA: G. Lange
FRC #2439 (BHS Robotics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Hawaii
Posts: 4
gordo161101 is an unknown quantity at this point
Re: Deploying stand-alone program on crio.

Trying to get the robot application to be loaded and run when the crio is powered off and powered back on. LabView provides a procedure for doing this, referring to this as running in stand-alone mode, have not found anything similar for Java. I assume this is needed for the competition.

Initially thought that the way netbeans loads the code this was basically done but is not. Powering off the crio and back on does not run the robot application. Have to load via netbeans again.

So far none of the suggestions has helped. Thanks.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2011, 09:43
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Deploying stand-alone program on crio.

OK,

Java always downloads the code to the the cRIO's file system, then always reboots the robot. So if you've ever seen you code run from netbeans, then you've seen it run in "stand-alone mode".

So the problem is - why does the robot not seem to run when you don't start it from NetBeans.

Before power-cycling your robot, try one of these things:
  • Run the NetConsole application on the driver station or a development machine
  • Run "ant echo" from a development machine that's networked to the cRIO:
    1. cd to your robot project directory
    2. type "ant echo"

One thing to keep in mind is that if you are power cycling your robot (vs resetting the cRIO), it can take the new wireless access point 40 seconds to reconnect. In the mean time your robot program will have started up so you will miss any messages that you print during initialization.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2011, 17:23
gordo161101 gordo161101 is offline
Registered User
AKA: G. Lange
FRC #2439 (BHS Robotics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Hawaii
Posts: 4
gordo161101 is an unknown quantity at this point
Re: Deploying stand-alone program on crio.

Thanks for your help, problem resolved.
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


All times are GMT -5. The time now is 00:40.

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