Is it possible to switch off motor's built-in PID regulator? In any software...
Announcement
Collapse
No announcement yet.
Motor PID regulator
Collapse
X
-
Let me rephrase it. Are you asking whether "Is there a way to let the motor move freely without actively trying to return to the last programmed position?"
The short answer is yes, use "setMotorBrakeMode(motor, motorCoast)".
Full answer: The motor could be in one of three different brake modes.
The default one you know is motorHold, where it tries to stay in last position.
Next is motorBrake - the motor would brake, but won't counter-act the external force. No power is delivered to the motor, but it's terminals are shorted, working as an electric brake.
The last is motorCoast, which basically disconnects the motor so you only fight the gears and the friction.
For full reference, see http://help.robotc.net/WebHelpVEX/Co...rBrakeMode.htm.
-
This is not quite I meant. I want that two motor states:
1) motor is off, without any break or hold.
2) motor is running on minimum power (lets say 1 %)
...behave more similarly. However, in reality, in the first mode I can turn the motor shaft freely by hand, but in the second - I can't; the motor resist manual (inertial) turning.
Comment
-
1) stopMotor() + setMotorBrakeMode(motorCoast) should do that
2) if you want the motor to move on its own (such as setMotor(m, 5)) but being rather weak, perhaps setMotorCurrentLimit(m, 50) would be the thing...
I can certainly fight a motor running at 100mA current limit, though I suspect it would still try to return to the expected position. But perhaps if you were using it with setMotor (as opposed to moveMotor or setMotorTarget), it would have no "expected position". I haven't tried that though...
Comment
Comment