Catapult stops firing

Hello Vex Forum,
My team and I have a problem with out catapult, we are using a limit switch for it. The problem with the catapult is that sometimes, after two or three shots, the catapult doesn’t respond. Everything else was going correctly, being able to move the chassis and the descorer, but the catapult would not move. Our current robot is made from Legacy motors and was coded by RobotC. This is our current catapult code:
if(vexRT[Btn6D])
{
startMotor(port7, -127);
startMotor(port9, 127);
}
if (SensorValue[dgtl1] == 1)//If the sensors put down, catapult goes slowly
{
startMotor(port7, -25);
startMotor(port9, 25);
}
if (vexRT[Btn6U] && SensorValue[dgtl1] == 1)
{
startMotor(port7, -127);
startMotor(port9, 127);
}
If you could help, it would be greatly appreciated,
Thanks for responding!

Non-response from the motors could be a PTC/stall issue. Sometimes the “hold” code (the part where the motors run at 25 to hold it in place, I’m guessing) can stall them over time. If that’s the issue, you could make it so the button pulls back and fires the catapult without stopping.


if (vexRT[Btn6D] && SensorValue[dgtl1] != 1){ //if the button is pressed and the sensor isn't tripped...
//run the motors
}

else if (SensorValue[dgtl1] == 1){ //but if the sensor is tripped...
//bump the motor for some time so it fires
} 
//doing it this way will make sure that it stops and doesn't fire if you release the button before the switch is hit.

else { //this is optional
//whatever you want
}

What internal gears are you using? You might also want to take a look at the gears that help pull the catapult back and see if there’s any friction or if your motors are actually strong enough to handle it. Removing rubber bands and testing it will expose any problems there.

Also, does the rest of your code have a while(1) loop around it? I assume it does, because it actually runs a few times before quitting, but make sure your braces are matched.
Correct me if I’m wrong about anything.

My guess would be your motors are not strong enough to handle it and are burning out. We use 2 high strength legacy motors with the 16 tooth gear to the 64 tooth gear.

@Royal_Freedom
We have a slipgear for our catapult, so that the gears and motors only go in one direction, we are planning on never stopping the motors. We have tested multiple times with and without wrapped surgical tubing and the motors are strong enough to pull it down. I think the problem is that if the catapult never hits the limit switch, and yet the motors just stop, so I don’t know how to fix that problem.

We use a slip gear too

I suggest a ratchet to replace your hold code. use a ratchet. this makes it so the catapult physically cannot go up unless it has hit the shaven area of the slipgear. this saves the motors a ton of energy, and works better I’d imagine then a limit switch. either that or a P controller using a potentiometer on your catapult. although I recommend ratchet.

Can you send a photo of the gearing? My best bet would be that your motors are overheating due to the bands, but it may also be from accidental friction in your gearing.