Slot1Configs Class

Gains for the specified slot.

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

Definition

Namespace: CTRE.Phoenix6.Configs
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public class Slot1Configs
Inheritance
Object    Slot1Configs

Constructors

Slot1ConfigsInitializes a new instance of the Slot1Configs class

Methods

Deserialize Deserialize string and put values into this object
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Serialize Serialize this object into a string
ToString Provides the string representation of this object
(Overrides ObjectToString)

Fields

GravityType Gravity Feedforward Type

This determines the type of the gravity feedforward. Choose Elevator_Static for systems where the gravity feedforward is constant, such as an elevator. The gravity feedforward output will always be positive. Choose Arm_Cosine for systems where the gravity feedforward is dependent on the angular position of the mechanism, such as an arm. The gravity feedforward output will vary depending on the mechanism angular position. Note that the sensor offset and ratios must be configured so that the sensor position is 0 when the mechanism is horizonal, and one rotation of the mechanism corresponds to one rotation of the sensor position.

kA Acceleration Feedforward Gain

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

  • Minimum Value – 0
  • Maximum Value – 3.4e+38
  • Default Value – 0
  • Units
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
kG Gravity Feedforward Gain

This is added to the closed loop output. The sign is determined by the type of gravity feedforward. 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
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
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, or 1/rps.

  • Minimum Value – 0
  • Maximum Value – 3.4e+38
  • Default Value – 0
  • Units
kS Static Feedforward Gain

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
kV Velocity Feedforward 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 feedfoward gain will be duty cycle per requested rps, or 1/rps.

  • Minimum Value – 0
  • Maximum Value – 3.4e+38
  • Default Value – 0
  • Units

See Also