L16-R Linear Servo don't stop in Disable mode

Hey, I’m using L16-R linear servo in my robot and I noticed it doesn’t stop when disabled.

I noticed that the motor goes to the last position (the last PWM signal).
The L-16-R library that I created extends from the Servo that extends from the PWM and when I tried using the disabling function inside the PWM class it didn’t seem to work (I activated it with a button and disabelInit()).

What I did manage to do is to set the position always to the current position ±1 until we got to the setpoint, this way if we disable the robot it will stop, because the last setpoint was his current position.

The problem with this solution is that it seems to slow down the L-16 motor.

so my questions are:
1. Do you have another way to disable the L-16 R servo?
2. Is it ok that the motor will move after being disabled?

my code:

This is the code without my solution

my solutions that slows the motor:
public void setSpeedForPosition(double setpoint) {
setpoint == currentPos ? getPosition() : setpoint > currentPos ? getPosition() - 1 :
getPosition() + 1));

public void setSpeed(double speed) {
setSpeedForPosition(speed == 0 ? getPosition() : speed < 0 ? getPosition() - 1 : getPosition() +

If it’s at one extreme and then you command the other extreme, and then disable, does it keep moving to the other extreme, or does it move to somewhere in the middle?
What happens if you change the bounds to setBounds(MAX_PWM_PULSE, 0, 0, 0, MIN_PWM_PULSE); which is more similar to the Servo class

It will go to the other extreme point, and I haven’t tried setting the bounds to 0,0,0 (I will try) but I took the values from the wcp manual https://wcproducts.info/files/frc/manuals/WCP%20Miniature%20Linear%20Servo%20Actuators%20-%20User%20Guide.pdf

These values are also in the Andymark manual:

MORE detail manual:

I believe the problem is that the roboRio doesn’t change its pwm value when disabled, Or the linearServo somehow remembers its last pwm value.

I suspect the latter. A regular servo stops when disabled for me.

The RoboRIO forces the PWM output to low the instant it is disabled:

(note the last pulse is shorter too because it was disabled mid pulse)

So what appears to be happening is the linear servo continues going to its last commanded position when the PWM pulse train is lost.

Regarding your second question, there is no rule that prohibits this behavior.

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