ONE DIRECTION BURN PROBLEM!!

Hi there,

Today we were preparing our robot and noticed that the arm was having a problem where it would stutter. We were victims of this problem earlier on too but we bought a new cortex which fixed the problem. (As a brief description of the problem, it is a one-direction burn, we believe. The arm will smoothly move in one direction but it will stutter when it moves in the other direction. The stuttering does not occur in a pattern. It is extremely random stuttering, as in the noise goes tut-tut-tuttuttut-tuttut, etc.) We thought that the port was burned in one direction because we read some forums about other teams having that problem but we wrote another basic program using the same port and the arm moved fine in both directions. We were extremely baffled by what happened. We tried multiple solutions and read everywhere but we cant find out why this happened. We have a competition coming up this Saturday so it would be great if anyone could help us by then.

Thanks,
10X

Note: (@jpearman I have updated this post to include the code (attached). The code that doesn’t work is currently commented out, and the code that works is the function called CortexTest(); in usercontrol. The function is defined at the very bottom of the entire program. Thanks for the help.)
RobotCQuestionCode.zip (2.91 KB)

so this sounds like it is a code problem, can you post it so I can take a look.

I assume you are having a problem with this code.

if(vexRT(Btn6D)== 1)
{
  //LowerTower(127);
  //motor[TowerMidRightTwo] = -127;
  motor[port5] = -127;
  //motor[TowerMidLeft] = -127;
  //motor[TowerMidLeftTwo] = -127;
}
if(vexRT(Btn6U)== 1)
{
  //RaiseTower(127);
  //motor[TowerMidRightTwo] = 127;
  motor[port5] = 127;
  //motor[TowerMidLeft] = 127;
  //motor[TowerMidLeftTwo] = 127;

}
else
{
  //  RaiseTower(0);
  //motor[TowerMidRightTwo] = 0;
  motor[port5] = 0;
  //motor[TowerMidLeft] = 0;
  //motor[TowerMidLeftTwo] = 0;
}

The problem is that if Btn6D is pressed then, although you correctly control the motors with -127, the following if-then-else condition will still execute the else condition and set the motors to 0. The simple solution is an additional else just before the test for Btn6U as follows.

if(vexRT(Btn6D)== 1)
{
  //LowerTower(127);
  //motor[TowerMidRightTwo] = -127;
  motor[port5] = -127;
  //motor[TowerMidLeft] = -127;
  //motor[TowerMidLeftTwo] = -127;
}
else
if(vexRT(Btn6U)== 1)
{
  //RaiseTower(127);
  //motor[TowerMidRightTwo] = 127;
  motor[port5] = 127;
  //motor[TowerMidLeft] = 127;
  //motor[TowerMidLeftTwo] = 127;

}
else
{
  //  RaiseTower(0);
  //motor[TowerMidRightTwo] = 0;
  motor[port5] = 0;
  //motor[TowerMidLeft] = 0;
  //motor[TowerMidLeftTwo] = 0;
}