Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Deploying stand-alone program on crio. (http://www.chiefdelphi.com/forums/showthread.php?t=91823)

gordo161101 14-02-2011 18:04

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.

ProgrammerMatt 14-02-2011 18:59

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() {

}


dflaws 14-02-2011 20:57

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)

derekwhite 15-02-2011 09:08

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.

gordo161101 15-02-2011 13:41

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.

derekwhite 16-02-2011 09:43

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.

gordo161101 16-02-2011 17:23

Re: Deploying stand-alone program on crio.
 
Thanks for your help, problem resolved.


All times are GMT -5. The time now is 22:19.

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