Cortex ports 2-9 not working...

Hello all,

Recently my cortex has stopped working through ports 2-9 (everything worked fine 3 days ago). I wrote very simple code to test the motors the other day and I got no response from those ports. The code looks like this (including task main):

{
motor[port2] = 127;
wait1Msec(3000);
}

I am in a high school robotics class and have access to lots of parts. I have tried everything I can think of to solve the issue. Here’s what I have tried:

brand new controller 29
brand new cortex
different motors (each of which I am 100% sure are in working order, because I have tested them)
different USB cables
power cycling (cortex and robotC program)
I have wiped the cortex and installed the most recent software
I have the latest version of robotC installed on my computer
I have used sample programs to rule out the possibility that I’m writing faulty code
I have even tried it on a different computer (which I am 100% sure works, because another group is using it to program their robot)

After trying all those things, it still does not work through ports 2-9. So far, I believe issues with the computer software, cortex, 29 controller, motors, USB cables, and my own coding can be ruled out.

Does anyone have any ideas as to what could be wrong?

Thanks in advance!

Make sure you updated your Vex Cortex and your Vex Joystick firmware.

Click the Robot Tab > Download Firmware > then automatically update both the Joystick or Vex Cortex.
Make sure you connect the Joystick or Cortex to your laptop when updating the firmware.

I have done both. Any other ideas?

Are you on IQ settings or VEX2 settings?

VEX2

Is the code in op control?
Are the PWM cables plugged in the right way?
Are you just signaling port2?
Is the Cortex firmware up to date?
Is the battery voltage good?

The PWM cables are plugged in the right way, I am only signaling port2 (but have tried others with the same result), the cortex firmware is up to date, and the battery voltage is good.

What do you mean is the code in op control?

Run this code…

#pragma config(Motor,  port1,           m1,            tmotorVex393_HBridge, openLoop)
#pragma config(Motor,  port2,           m2,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           m3,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port4,           m4,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           m5,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port6,           m6,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           m7,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           m8,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           m9,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port10,          m10,           tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include "Vex_Competition_Includes.c"

void pre_auton() {
  bStopTasksBetweenModes = true;
}

task autonomous() {
  AutonomousCodePlaceholderForTesting();
}

task usercontrol() {
  while(true) {
    setMultipleMotors(127, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10);
  }
}

To Cody-

I’ll try running that code next time I have class. Thank you.

To Infinity Minus 1-

I don’t believe the code or firmware are faulty. I have updated the firmware and checked over the code multiple times. Also, I know the cortex isn’t the issue, because I tried it with a brand new one and I still had the same problem. I tested all the motors before and after the problem occurred; they’re all still working. I Have access to another computer with RobotC, and the problem persisted on that computer as well. For your final question, yes the sample codes work (well, at least they used to…). Like I said above, I have tried everything I can think of but I have yet to solve the problem.
Thanks for your suggestions.

I’m confused now. If you loaded your code on another Cortex, and it showed the same symptoms (ports 2-9 don’t work) the problem is in software, and probably is your code. The chance of two separate Cortexes showing the same bizarre symptom is just about zero. Cortex controllers with both internal motor controllers (2-9) not working are very rare. If the ports are working with demo programs, it’s not a hardware problem.

If I had a dollar for every time a programmer assured me that his code was not the problem, and it was, I would have a lot more dollars.

Try starting over and writing the same program from scratch and see what happens.

One other thing to be sure to try is another PC for compile and download. Could be some strange corruption happening there.

I am with Rick on this, the odds are greater on user coding error than compiler error/download error (despite my disdain for Windows OS).

Are you connecting the cortex to the controller with the orange cable? if not this might fix the issue

To Rick Tyler and Iacsap -

I have tried it with a demo program as well (on multiple computers), and the same thing kept happening. I think that rules out a coding error.

To mbrh -

I’ve tried that and it did not solve the problem.

To shawman -

Yes, I am using the orange USB cable. I have in fact tried it with different orange USB cables as well and the problem persisted.

Did you use different motor controllers while testing on a brand new cortex?

Are you even using motor controllers on the motors. Stupid question but I have seen that mistake happen before