Motors not holding

I’m using V5 smart motors and VEX code blocks to program. But my motors are not holding correctly. When we control the arm to move up it falls down if the correct button is not pressed. How do I get my arm and claw to hold without holding the buttons down?
code

1 Like

Not the answer, but I would also like to know this information as I am about to begin programming for competitions using a 6 bar lift.

1 Like

Not sure if it is related to this issue but you will want to use an else if statement to make the arm go down and then else being held like you have now.

1 Like

When you set the motors to hold, that generally isn’t enough to keep your lift in place, so you might want to add holding power. What this means is when you aren’t powering the lift (with the buttons already set up) assign a power of maybe 10 or 15. This counteracts the force of gravity and keeps your lift in the same place.

1 Like

How do I set a holding power?

set Claw stopping to hold doesn’t actually stop the motor. You need to actually stop the motor for it to work. There should be something like stop motor hold

1 Like

Is this what you are referring to? code

3 Likes

Yes. Try using if controller R1 pressed then the next part is else if controller R2 pressed then else motors stop

The format should be:
If
Else if
Else

1 Like

I tried to look for an else if statement but I could not find one on blocks. I know I was able to use an else if statement on Coding Studio but I’m not sure the VEX code has that capability. Or Maybe I have to use the text instead of the blocks? Do you know anything about that?

Looking at the blocks you could put an if statement in the else of the first one, and it should function like you want

You don’t even need to use a forever loop. This will do it for one motor and button. Just add the different buttons and motors you need.

image

4 Likes

You do not need to use a holding power with V5. That was with the older platform.

4 Likes

How would this work if I’m using a competition template?

1 Like

It works fine. The controller is disabled at the firmware level on disable and auto, so you can’t override it.

I’m pretty sure one of my teams didn’t even have a driver control block. They just did everything off of events.

2 Likes

Okay sweet. I’ll try this out today and see how it works.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.