![]() |
[FTC]: coasting mode: save your gearboxes!
With a tip from this thread, I was able to get the motors to stop dynamic braking at speed=0 and instead coast. The motivation was that the hard braking was damaging the gearboxes in our motors.
The main idea is "don't use speed = 0." Setting the speed to 1 avoids the braking mode. But this only works if the current speed was > 0 (forward). If the current speed was < 0 (backward), setting speed to +1 caused braking to happen. In this case using -1 avoided braking mode. In other words, the value to use for "coast" depends on the current direction of the motor. Therefore this requires access to the current speed setting of the motor. I created a "speed-setting" function for each motor that remembers the speed it was set to: Code:
setLeftSpeed( speed );Code:
motor[left] = speed;Code:
short leftSpeed = 0; // globalCode:
// globals: |
Re: [FTC]: coasting mode: save your gearboxes!
RobotC has a function similar to this built in, but I think it only works with the three LEGO NXT motors.
http://www.education.rec.ri.cmu.edu/..._res_words.pdf bFloatDuringInactiveMotorPWM = true; (or false; ) This is used to set whether the motors on the NXT will float or brake when there is no power applied. There are two settings: false - motors will brake when inactive true - motors will float when inactive Thanks for posting code that provides the same functionality for the 12V DC motors! |
| All times are GMT -5. The time now is 18:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi