Wire Extension problem

Hi.
I have deduced the problems on my danny lift to two problems;
-Programming
-2 and 3 wire extension chord(s)

When the motor controller is plugged directly into the cortex, the motors work perfectly. When I take out the motor control out and place the 2 wire extension and put the motor control at the end of that, it doesn’t seem to work. Same goes for the 3 wire extensions, though the extension comes after the motor control.

I am firmly positive it is not my motors because of the reason I stated above, which is that I connected the motor control directly to the cortex and it worked.

As I am the only person in my school that is familiar with robotC I would like you to revise my code in case I’m missing something. Other than that, it might be my motor control wires not playing nice with the extensions

#pragma config(Motor,  port2,           rightFront,    tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port3,           leftFront,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port4,           rightBack,     tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port5,           leftBack,      tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port6,           rightTop,      tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port7,           leftTop,       tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           rightBottom,   tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port9,           leftBottom,    tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"   

void pre_auton()
{
  bStopTasksBetweenModes = true;

}


task autonomous()
{
	AutonomousCodePlaceholderForTesting(); 
}


task usercontrol()
{
	if(vexRT[Btn5U] == 1)
	{
		motor[rightTop] = 127;
		motor[leftTop] = 127;
		motor[rightBottom] = 127;
		motor[leftBottom] = 127;
	}
	else if(vexRT[Btn5D] == 1)
	{
		motor[rightTop] = -127;
		motor[leftTop] = -127;
		motor[rightBottom] = -127;
		motor[leftBottom] = -127;
	}
	else
	{
		motor[rightTop] = 0;
		motor[leftTop] = 0;
		motor[rightBottom] = 0;
		motor[leftBottom] = 0;
	}
	

	while (true)
	{
	 	motor[rightFront] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];
		motor[rightBack] =  vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
		motor[leftFront] = vexRT[Ch3] + vexRT[Ch1] + vexRT[Ch4];
		motor[leftBack] =  vexRT[Ch3] + vexRT[Ch1] - vexRT[Ch4];
	}
}

Doesn’t work how?

a- there is no motor movement whatsoever
b- motor movement is twitchy and doesn’t function correctly

A- as in the motors do not move at all when connected to an extension cable.

There does definitely seem to be an issue in your code. The button functions for the Reverse Double 4 Bar lift look fine, but the code for the drive should not be in a separate while(true) loop. Right now, your program will run the button functions one single time, and then get stuck on the drive. Get rid of that loop and you should be fine.

I don’t know why the wires could have an effect on this. If there are still some issues that might be related to wires, switch around the wires and MC29s to see if some may be bad.

I agree, where is your while loop for your user control?

Didn’t even notice at first that it was completely missing around everything. So don’t delete the while loop, put everything into it!

Found where it was hiding… Our second team had a problem similar to this, however the motors would twitch (run 1 full rotation then pause) instead of working/not working at all.