RobotC: Downloading Code etc

I find it rather irritating that with 25+ years programming experience under my belt I don’t seem to be able to get something that is aimed at students working correctly. Of course this is not helped by only having 1 hour per week and working in an environment where the computers are old and slow and absolutely everything is locked down and no (present in the classroom) has admin access.

Anyway enough pointless complaining and onto the problems at hand: there are 2 current problems we have.

  1. We only seem to be able to upload code to the Cortex via a direct serial link (using USB A-A cable (the very existence of such a thing shocks me to my core, very much against the USB standard I believe)) if we try to do this via VEXNet with the Joystick connected to the PC we get a could not communicate error (I would post a picture but I’m at work and have no access to the PC/Robot right now).

  2. Having downloaded and run the program via RobotC it is not clear how you get the program to run again once you have detached the Cortex from the PC. Is the program just supposed to run when you switch it on.

  3. … oh … there are 3 current problems we have

  4. Before we downloaded a program to the Cortex when you switched on the Cortex and Joystick they would connect and then you could control the Robot manually using the Cortex. Having downloaded a program (a simple one that just switch on all the drive motors for 5 seconds) when we switch on the Cortex and Joystick the seem to connect (all the lights go green) but nothing happens, our downloaded program does not seem to run and the Joystick does not have any control over the robot.

  5. … ah … among the many problems we are currently having

  6. I feel like I am missing some documentation I am using VEXnet-UserGuide-20150210.pdf but that has a single paragraph on programming. I feels like I am missing the bit of documentation that says “When you have downloaded your program to the Cortex this is what you can expect to happen. If you want to get back to the previous behaviour of the Joystick and Cortex this is what you need to do.”

  7. What are the different communications modes “VEXNet or Use”, “USB Only”, “Competition (VEXNet)” about. that doesn’t seem to be explained anywhere.

Cheers
Ben

Old or new programming cable?
Have a look in the device manager and make sure the driver is loading correctly, it should show under ports.

Whatever program is loaded into the cortex will run when you turn the power on.

You need to set the VEX Cortex communications mode to either “VEXnet or USB” or “competition” (I suggest competition).
cortex_comms_mode.png

Have a look at the RobotC wiki.
http://help.robotc.net/WebHelpVEX/index.htm#Resources/topics/Getting_Started/Cortex_Setup_-_VEXNet.htm

“USB Only” assumes you will use the cortex without VEXnet key and/or joystick. The other two assume the opposite.