Are there any flaws? Anything that would cause overheating problems?
Is there a flaw in my code that would cause the motor to overheat? We are experincing over heating problems
It’s probably not your code that’s causing it to overheat. This is often caused by not having enough torque. How long does it take for the motor to stop working and what gear ratio do you have?
We have a red motor Cartridge and it stopped working after about 10 minutes of constant practice. There is a significant amount of weight on the motor. We have 2 red motors which lift a goal.
That is normal performance. The V5 motors tend to overheat around that range. If you want to run it for longer than that, you could try making quick-swap motors using zipties.
It’s not causing your heating problem, but your code has an error and could be cleaned up also.
You are making a deadband, but are using absolute value incorrectly. You ONLY need the abs ctrl2 > 5 logic… if you take abs of negative value… then you get a positive and your logic check #2 always fails as a positive will never be less than -5.
In addition… I would change the if else block and make 2 additional if slots… then put the 2 single if blocks into the newly expanded if/else block. Will be cleaner. Code will run faster.
Some of this is just ‘good programming’. But sometimes I’ve seen blocks of code ‘fight’ back and forth due to timing issues… causing a motor to stop/start very rapidly… which causes reduced performance and drastic heating.
To elaborate on his point, I’ve found that blocks can be very inconsistent. It literally skipped over lines all the time from my experience with it. Vex Pro though, or PROS, are much more simple and consistent (for me at least). I dislike blocks because I think they’re very limited and strange, but I get why other people do
You should make the jump over to vex code and join the squadddd
Gonna have to disagree with blocks being limited. We have PID control using blocks.
Using stop hold for prolonged periods of time can make the motor start to over heat because the motor is actively holding its position.
Going off 7996B’s post… and your mention of 2 red motors holding a goal…
I assume you are using a motor pair based on what you say and the code shown. Paired motors, if not physically balanced, will work against one another.
By physically balanced I mean: linkages exactly the same, gears meshed at precisely the same spot, bot square & level, etc. Otherwise… they try to work together, but due to differences in their movement & load, end up working against each other.
Ok yeah, but I’m pretty sure you can do PID in vexcode and pros
You got 10 minutes?!?!
We get like, 6-7 before it overheats, you are absolutely fine!
As @xTigr asked, what gear ratio are you using? We need to know the gearing outside of the red motor cartridge. If you have the axle coming out of the motor and straight to the arm then you most likely have a problem that would cause overheating.
Usually teams will have a small 12 tooth (metal) gear on the axle that connects to the motor and a 60 or 84 tooth gear on the arm. If that is your issue then this article should provide more information: Vex KB : Using Gear Ratios
Of course. My comment was that blocks are not nearly as limited as most think if it’s possible to do PID control with them.