I want to know the program about "hold"

I want to know the principle of “vex::brake::hold”, why it can brake. What I am thinking of is to keep it in the encoder position of the last moment with the built-in pid algorithm. :thinking:But what I don’t understand is that when you hold it or turn its shaft, and it will give you a reversal force.
why?

It applies motor power to resist any changes in position.

2 Likes

We just had a thread about this. Make sure you search a topic before creating a new one.

2 Likes

It’s just using PID to move motor back to position.
brakemode brake instead brakes motor electronically by just applying reverse current, so applied voltage goes in same direction as the back emf.

1 Like

I am sorry that I did not read it carefully, but I still want to know why, when the error is very small, the adjustment of the built-in pid can be so sensitive.

Its just standard PID, running at a very high refresh rate, allowing for high gains.

3 Likes

brake mode just shorts the motor.

3 Likes