You seem to have the same problem as us. We weren't even sure if the code we were downloading, SimpleRobot, was even running even though it said it downloaded. However, I think I finally figured out how this system works. If you are downloading the code to ram, then make sure that there is no currently deployed code by undeploying in the first menu. What lead me to this conclusion is that after figuring out how to enable target console, whenever I tried to download and run a program in ram, it said Default code already running or something like that. After undeploying, I no longer got that error and my printf's in the constructor said something. Yay! so try seeing if it's running first of all. Only today did I finally get some code running (printf's) and figuring out exactly how it executes code in Autonomous and Operator how the watchdog works.. I've yet to figure out how to do digital io's, motors, dashboard, and if possible driver station lcd. What I've learned though, if it's not working, restart the cRio. It's hard to say technically what's the problem but the console output can usually give a lead on problems.
Anyways This is my modified version of the SimpleRobot just to see if anything is running. Open up the target console(make sure Console Out dipswitch is on and default settings for the target console should work) by right clicking on the vxworks>target tools. After building and downloading the program, you should see the printfs when the program starts and when the operator/autonomous switch is toggled.
Code:
#include "WPILib.h"
/**
* This is a demo program showing the use of the RobotBase class.
* The SimpleRobot class is the base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls.
*/
class RobotDemo : public SimpleRobot
{
/* Template stuff
RobotDrive myRobot; // robot drive system
Joystick stick; // only joystick
*/
public:
RobotDemo(void)
/* Template stuff
myRobot(1, 2), // these must be initialized in the same order
stick(1) // as they are declared above.
*/
{
GetWatchdog().SetExpiration(100);
printf("Justin:WTF DO YOU WORK\n");
printf("FFS\n");
printf("cRio: Why yes, I do in fact work\n");
}
/**
* Drive left & right motors for 2 seconds then stop
*/
void Autonomous(void)
{
printf("Im in your autonomous, running your codez\n");
GetWatchdog().SetEnabled(false);
while (IsAutonomous())
{
}
//haha, infinite loop!
//while(1)
// printf("NOOOOO");
/* Template stuff
myRobot.Drive(0.5, 0.0); // drive forwards half speed
Wait(2.0); // for 2 seconds
myRobot.Drive(0.0, 0.0); // stop robot
*/
}
/**
* Runs the motors with arcade steering.
*/
void OperatorControl(void)
{
printf("All crews reporting. Make it happen\n");
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())
{
GetWatchdog().Feed();
/* Template stuff
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
*/
}
}
};
START_ROBOT_CLASS(RobotDemo);
Your code should download quickly; it is transferring through FTP just a .out file.