Edit

Share via


Brick.SetMotorPositionKD(Byte, Byte) Method

Definition

Set the motor target position KD constant If you set KP higher, the motor will be more responsive to errors in position, at the cost of perhaps overshooting and oscillating. KD slows down the motor as it approaches the target, and helps to prevent overshoot. In general, if you increase kp, you should also increase KD to keep the motor from overshooting and oscillating.

public void SetMotorPositionKD (byte port, byte kd = 70);
member this.SetMotorPositionKD : byte * byte -> unit
Public Sub SetMotorPositionKD (port As Byte, Optional kd As Byte = 70)

Parameters

port
Byte

The Motor port(s). PortA, PortB, PortC, and/or PortD.

kd
Byte

The KD constant (default 70)

Applies to