My team is having trouble with a weird motor speed issue. We have a DR4B lift with one motor on each side (labeled Lift_Left and Lift_Right in the code). When we run the code, the left side of the lift is running much faster than the right. I disengaged the motors from the lift and used the on-board diagnostics in the brain and got the following results:
- Motors wired as shown, lift set full up:
- Left motor: 50 RPM
- Right motor: 10 RPM
- Motors reversed at brain, lift set full up:
- Left motor: 10 RPM
- Right motor: 50 RPM
Based on this, I don’t think it can be the motor, as the problem switches sides when I switch cables. I have also tried moving the right motor from port 18 to port 17, with no resolution.
I am attaching the relevant function below (code formatting seems to be really weird).
Any suggesions?
Thanks!
Wayne
Motor definitions:
Lift_Left = vex.Motor(vex.Ports.PORT13, vex.GearSetting.RATIO36_1, True)
Lift_Right = vex.Motor(vex.Ports.PORT18, vex.GearSetting.RATIO36_1, False)
Function:
def Lift(LiftSpeed):
#Lift function
if LiftSpeed > 5 or LiftSpeed < -5:
Lift_Right.spin(vex.DirectionType.FWD, LiftSpeed, vex.VelocityUnits.PCT)
Lift_Left.spin(vex.DirectionType.FWD, LiftSpeed, vex.VelocityUnits.PCT)
else:
Lift_Left.stop(vex.BrakeType.HOLD)
#Lift equalization function
if Lift_Left.rotation(vex.RotationUnits.DEG) > Lift_Right.rotation(vex.RotationUnits.DEG) + 2:
Lift_Right.spin(vex.DirectionType.FWD, 10, vex.VelocityUnits.PCT)
elif Lift_Left.rotation(vex.RotationUnits.DEG) < Lift_Right.rotation(vex.RotationUnits.DEG) - 2:
Lift_Right.spin(vex.DirectionType.REV, 10, vex.VelocityUnits.PCT)
else:
Lift_Right.stop(vex.BrakeType.HOLD)