Motor/wire problem

Today I finished the wiring on our RD4B lift, and the two motors controlling the final section on the arm(a mini 4 bar) would not lift the claw. The motors go down fine, but they would not lift the claw up. They kept making the claw jump around and were not in sync with each other.

I disconnected them from the lift and tested the motors without any stress applied to them. They were stuttering and would not move constantly.

…check the internals?
Especially if someone changed the gears, make sure everything on the inside is correct.

Post your code? Perhaps it’s a software issue?

I could not check the internals while I was there, but I did some basic tests to see if internal gears were stripped etc. while I was turning the motors with my hand, the small motor inside was always being stressed by the force of my hand. Plus it seems extremely unlikely that both motors had internal gearing issues. I will check when I get back to the robot though.

As for the coding, I do not think it is a problem with the code. The code was really just copied from previous code made by our seasoned programmer, but the code was adapted to fit the buttons on the face of the controller.

A. Check internal gears
B. Check code for errors
C. Check motor controllers (sometimes when they fail, you lose only one direction)

Are they y-cabled together? Maybe there’s an issue with the y-cable. Other than that it sounds like a code issue to me; another subsystem may be interfering with it. Could you post the program please?

There is currently no Y-cable connecting the two motors, but there is a long custom cut cable for each of them.

When I tested the motors without any stress, they could not maintain a constant electrical current.

As for coding errors


#pragma config(Sensor, in1,    LP,             sensorPotentiometer)
#pragma config(Sensor, in2,    RP,             sensorPotentiometer)
#pragma config(Motor,  port1,           claw,          tmotorVex393_HBridge, openLoop)
#pragma config(Motor,  port2,           al,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           ld,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port4,           ll,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           rl,            tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port6,           lsl,           tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           rsl,           tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor,  port8,           rd,            tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           ar,            tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

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

void pre_auton()
{
  bStopTasksBetweenModes = true;

	// Set bDisplayCompetitionStatusOnLcd to false if you don't want the LCD
	// used by the competition include file, for example, you might want
	// to display your team name on the LCD in this function.
	// bDisplayCompetitionStatusOnLcd = false;
}

task autonomous()
{

}

task usercontrol()
{
  while (true)
  {
    //motor[fl] = vexRT(Ch3);
		motor[ld] = vexRT(Ch3);
		motor[rd] = vexRT(Ch2);
		//motor[fr] = vexRT(Ch2);
		if(vexRT[Btn5U]==1)
		{motor[al]=67;
			motor[ar]=67;}
		else
		if(vexRT[Btn5D]==1)
		{motor[al]=-67;
			motor[ar]=-67;}
		else
		{motor[al]=0;
			motor[ar]=0;}
		if(vexRT[Btn6U]==1)
		{motor[ll]=67;
			motor[rl]=67;}
		else
			if(vexRT[Btn6D]==1)
		{motor[ll]=-67;
			motor[rl]=-67;}
		else
		{motor[ll]=0;
			motor[rl]=0;}
		if(vexRT[Btn8D]==1)
		{motor[lsl]=100;
			motor[rsl]=100;}
		else
		{motor[lsl]=0;
			motor[rsl]=0;}
		if(vexRT[Btn8L]==1)
		{motor[lsl]=-100;
			motor[rsl]=-100;}
		else
		{motor[lsl]=0;
			motor[rsl]=0;}
}
}

I have since tried to code for the claw on the end of the lift, and I had nearly the same issue. This leads me to believe it is a coding problem that resulted from trying to code for the buttons. We ran out of inputs on the controller, so we had to map the mini 4 bar motors, and the claw motor to those buttons.