Class Slot0Configs

java.lang.Object
com.ctre.phoenixpro.configs.Slot0Configs
All Implemented Interfaces:
ParentConfiguration, ISerializable

public class Slot0Configs
extends Object
implements ParentConfiguration
What the gains for slot 0 are

If this slot is selected, these gains are used in closed loop control requests.

  • Field Details

    • kP

      public double kP
      Proportional Gain

      The units for this gain is dependent on the control mode. Since this gain is multiplied by error in the input, the units should be defined as units of output per unit of input error. For example, when controlling velocity using a duty cycle closed loop, the units for the proportional gain will be duty cycle per rps of error, or 1/rps.

      • Minimum Value: 0
      • Maximum Value: 3.4e+38
      • Default Value: 0
      • Units:
    • kI

      public double kI
      Integral Gain

      The units for this gain is dependent on the control mode. Since this gain is multiplied by error in the input integrated over time (in units of seconds), the units should be defined as units of output per unit of integrated input error. For example, when controlling velocity using a duty cycle closed loop, integrating velocity over time results in rps * s = rotations. Therefore, the units for the integral gain will be duty cycle per rotation of accumulated error, or 1/rot.

      • Minimum Value: 0
      • Maximum Value: 3.4e+38
      • Default Value: 0
      • Units:
    • kD

      public double kD
      Derivative Gain

      The units for this gain is dependent on the control mode. Since this gain is multiplied by the derivative of error in the input with respect to time (in units of seconds), the units should be defined as units of output per unit of the differentiated input error. For example, when controlling velocity using a duty cycle closed loop, the derivative of velocity with respect to time is rps/s, which is acceleration. Therefore, the units for the derivative gain will be duty cycle per unit of acceleration error, or 1/(rps/s).

      • Minimum Value: 0
      • Maximum Value: 3.4e+38
      • Default Value: 0
      • Units:
    • kV

      public double kV
      Velocity Feed Forward Gain

      The units for this gain is dependent on the control mode. Since this gain is multiplied by the requested velocity, the units should be defined as units of output per unit of requested input velocity. For example, when controlling velocity using a duty cycle closed loop, the units for the velocity feed foward gain will be duty cycle per requested rps, or 1/rps.

      • Minimum Value: 0
      • Maximum Value: 3.4e+38
      • Default Value: 0
      • Units:
    • kS

      public double kS
      Static Constant

      This is added to the closed loop output. The sign is determined by target velocity. The unit for this constant is dependent on the control mode, typically fractional duty cycle, voltage, or torque current.

      • Minimum Value: -512
      • Maximum Value: 511
      • Default Value: 0
      • Units:
  • Constructor Details

  • Method Details