Table of Contents

Class TalonFXSConfiguration

Namespace
CTRE.Phoenix6.Configs
Assembly
Phoenix6.Hardware.dll

Class description for the Talon FXS motor controller.

This defines all configurations for the TalonFXS.
public class TalonFXSConfiguration : IParentConfiguration, ISerializable, ICloneable
Inheritance
TalonFXSConfiguration
Implements
Inherited Members

Fields

Audio

Configs that affect audible components of the device.

Includes configuration for the beep on boot.

Parameter list:
public AudioConfigs Audio

Field Value

AudioConfigs

ClosedLoopGeneral

Configs that affect general behavior during closed-looping.

Includes Continuous Wrap features.

Parameter list:
public ClosedLoopGeneralConfigs ClosedLoopGeneral

Field Value

ClosedLoopGeneralConfigs

ClosedLoopRamps

Configs that affect the closed-loop control of this motor controller.

Closed-loop ramp rates for the various control types.

Parameter list:
public ClosedLoopRampsConfigs ClosedLoopRamps

Field Value

ClosedLoopRampsConfigs

Commutation

Configs that determine motor selection and commutation.

Set these configs to match your motor setup before commanding motor output.

Parameter list:
public CommutationConfigs Commutation

Field Value

CommutationConfigs

CurrentLimits

Configs that directly affect current limiting features.

Contains the supply/stator current limit thresholds and whether to enable them.

Parameter list:
public CurrentLimitsConfigs CurrentLimits

Field Value

CurrentLimitsConfigs

CustomBrushlessMotor

Configs related to using a custom brushless motor that is not formally supported by Talon FXS.

Configs are only used when Motor Arrangement is set to Custom Brushless Motor. Note this feature will only work device is not FRC-Locked.

Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.

Parameter list:
public CustomBrushlessMotorConfigs CustomBrushlessMotor

Field Value

CustomBrushlessMotorConfigs

CustomParams

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public CustomParamsConfigs CustomParams

Field Value

CustomParamsConfigs

DifferentialConstants

Configs related to constants used for differential control of a mechanism.

Includes the differential peak outputs.

Parameter list:
public DifferentialConstantsConfigs DifferentialConstants

Field Value

DifferentialConstantsConfigs

DifferentialSensors

Configs related to sensors used for differential control of a mechanism.

Includes the differential sensor sources and IDs.

Parameter list:
public DifferentialSensorsConfigs DifferentialSensors

Field Value

DifferentialSensorsConfigs

ExternalFeedback

Configs that affect the external feedback sensor of this motor controller.

Includes feedback sensor source, offsets and sensor phase for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.

Parameter list:
public ExternalFeedbackConfigs ExternalFeedback

Field Value

ExternalFeedbackConfigs

ExternalTemp

Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.

Configs are only used when Motor Arrangement is set to Custom Brushless Motor or Brushed. Note this feature will only work device is not FRC-Locked.

Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.

Parameter list:
public ExternalTempConfigs ExternalTemp

Field Value

ExternalTempConfigs

FutureProofConfigs

True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.

This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.

This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
public bool FutureProofConfigs

Field Value

bool

HardwareLimitSwitch

Configs that change how the motor controller behaves under different limit switch states.

Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.

Parameter list:
public HardwareLimitSwitchConfigs HardwareLimitSwitch

Field Value

HardwareLimitSwitchConfigs

MotionMagic

Configs for Motion MagicĀ®.

Includes Velocity, Acceleration, Jerk, and Expo parameters.

Parameter list:
public MotionMagicConfigs MotionMagic

Field Value

MotionMagicConfigs

MotorOutput

Configs that directly affect motor output.

Includes motor invert, neutral mode, and other features related to motor output.

Parameter list:
public MotorOutputConfigs MotorOutput

Field Value

MotorOutputConfigs

OpenLoopRamps

Configs that affect the open-loop control of this motor controller.

Open-loop ramp rates for the various control types.

Parameter list:
public OpenLoopRampsConfigs OpenLoopRamps

Field Value

OpenLoopRampsConfigs

Slot0

Gains for the specified slot.

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

Parameter list:
public Slot0Configs Slot0

Field Value

Slot0Configs

Slot1

Gains for the specified slot.

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

Parameter list:
public Slot1Configs Slot1

Field Value

Slot1Configs

Slot2

Gains for the specified slot.

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

Parameter list:
public Slot2Configs Slot2

Field Value

Slot2Configs

SoftwareLimitSwitch

Configs that affect how software-limit switches behave.

Includes enabling software-limit switches and the threshold at which they are tripped.

Parameter list:
public SoftwareLimitSwitchConfigs SoftwareLimitSwitch

Field Value

SoftwareLimitSwitchConfigs

Voltage

Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.

Parameter list:
public VoltageConfigs Voltage

Field Value

VoltageConfigs

Methods

Clone()

Creates a copy of this configuration.

public TalonFXSConfiguration Clone()

Returns

TalonFXSConfiguration

Deserialize(string)

Take a string and deserialize it to this configuration

public StatusCode Deserialize(string to_deserialize)

Parameters

to_deserialize string

Returns

StatusCode

Return code of the deserialize method

Serialize()

Get the serialized form of this configuration

public string Serialize()

Returns

string

Serialized form of this config group

ToString()

Provides the string representation of this object

public override string ToString()

Returns

string

WithAudio(AudioConfigs)

Modifies this configuration's Audio parameter and returns itself for method-chaining and easier to use config API.

Configs that affect audible components of the device.

Includes configuration for the beep on boot.

Parameter list:
public TalonFXSConfiguration WithAudio(AudioConfigs newAudio)

Parameters

newAudio AudioConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithClosedLoopGeneral(ClosedLoopGeneralConfigs)

Modifies this configuration's ClosedLoopGeneral parameter and returns itself for method-chaining and easier to use config API.

Configs that affect general behavior during closed-looping.

Includes Continuous Wrap features.

Parameter list:
public TalonFXSConfiguration WithClosedLoopGeneral(ClosedLoopGeneralConfigs newClosedLoopGeneral)

Parameters

newClosedLoopGeneral ClosedLoopGeneralConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithClosedLoopRamps(ClosedLoopRampsConfigs)

Modifies this configuration's ClosedLoopRamps parameter and returns itself for method-chaining and easier to use config API.

Configs that affect the closed-loop control of this motor controller.

Closed-loop ramp rates for the various control types.

Parameter list:
public TalonFXSConfiguration WithClosedLoopRamps(ClosedLoopRampsConfigs newClosedLoopRamps)

Parameters

newClosedLoopRamps ClosedLoopRampsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithCommutation(CommutationConfigs)

Modifies this configuration's Commutation parameter and returns itself for method-chaining and easier to use config API.

Configs that determine motor selection and commutation.

Set these configs to match your motor setup before commanding motor output.

Parameter list:
public TalonFXSConfiguration WithCommutation(CommutationConfigs newCommutation)

Parameters

newCommutation CommutationConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithCurrentLimits(CurrentLimitsConfigs)

Modifies this configuration's CurrentLimits parameter and returns itself for method-chaining and easier to use config API.

Configs that directly affect current limiting features.

Contains the supply/stator current limit thresholds and whether to enable them.

Parameter list:
public TalonFXSConfiguration WithCurrentLimits(CurrentLimitsConfigs newCurrentLimits)

Parameters

newCurrentLimits CurrentLimitsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithCustomBrushlessMotor(CustomBrushlessMotorConfigs)

Modifies this configuration's CustomBrushlessMotor parameter and returns itself for method-chaining and easier to use config API.

Configs related to using a custom brushless motor that is not formally supported by Talon FXS.

Configs are only used when Motor Arrangement is set to Custom Brushless Motor. Note this feature will only work device is not FRC-Locked.

Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.

Parameter list:
public TalonFXSConfiguration WithCustomBrushlessMotor(CustomBrushlessMotorConfigs newCustomBrushlessMotor)

Parameters

newCustomBrushlessMotor CustomBrushlessMotorConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithCustomParams(CustomParamsConfigs)

Modifies this configuration's CustomParams parameter and returns itself for method-chaining and easier to use config API.

Custom Params.

Custom paramaters that have no real impact on controller.

Parameter list:
public TalonFXSConfiguration WithCustomParams(CustomParamsConfigs newCustomParams)

Parameters

newCustomParams CustomParamsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithDifferentialConstants(DifferentialConstantsConfigs)

Modifies this configuration's DifferentialConstants parameter and returns itself for method-chaining and easier to use config API.

Configs related to constants used for differential control of a mechanism.

Includes the differential peak outputs.

Parameter list:
public TalonFXSConfiguration WithDifferentialConstants(DifferentialConstantsConfigs newDifferentialConstants)

Parameters

newDifferentialConstants DifferentialConstantsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithDifferentialSensors(DifferentialSensorsConfigs)

Modifies this configuration's DifferentialSensors parameter and returns itself for method-chaining and easier to use config API.

Configs related to sensors used for differential control of a mechanism.

Includes the differential sensor sources and IDs.

Parameter list:
public TalonFXSConfiguration WithDifferentialSensors(DifferentialSensorsConfigs newDifferentialSensors)

Parameters

newDifferentialSensors DifferentialSensorsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithExternalFeedback(ExternalFeedbackConfigs)

Modifies this configuration's ExternalFeedback parameter and returns itself for method-chaining and easier to use config API.

Configs that affect the external feedback sensor of this motor controller.

Includes feedback sensor source, offsets and sensor phase for the feedback sensor, and various ratios to describe the relationship between the sensor and the mechanism for closed looping.

Parameter list:
public TalonFXSConfiguration WithExternalFeedback(ExternalFeedbackConfigs newExternalFeedback)

Parameters

newExternalFeedback ExternalFeedbackConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithExternalTemp(ExternalTempConfigs)

Modifies this configuration's ExternalTemp parameter and returns itself for method-chaining and easier to use config API.

Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.

Configs are only used when Motor Arrangement is set to Custom Brushless Motor or Brushed. Note this feature will only work device is not FRC-Locked.

Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.

Parameter list:
public TalonFXSConfiguration WithExternalTemp(ExternalTempConfigs newExternalTemp)

Parameters

newExternalTemp ExternalTempConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithHardwareLimitSwitch(HardwareLimitSwitchConfigs)

Modifies this configuration's HardwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.

Configs that change how the motor controller behaves under different limit switch states.

Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.

Parameter list:
public TalonFXSConfiguration WithHardwareLimitSwitch(HardwareLimitSwitchConfigs newHardwareLimitSwitch)

Parameters

newHardwareLimitSwitch HardwareLimitSwitchConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithMotionMagic(MotionMagicConfigs)

Modifies this configuration's MotionMagic parameter and returns itself for method-chaining and easier to use config API.

Configs for Motion MagicĀ®.

Includes Velocity, Acceleration, Jerk, and Expo parameters.

Parameter list:
public TalonFXSConfiguration WithMotionMagic(MotionMagicConfigs newMotionMagic)

Parameters

newMotionMagic MotionMagicConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithMotorOutput(MotorOutputConfigs)

Modifies this configuration's MotorOutput parameter and returns itself for method-chaining and easier to use config API.

Configs that directly affect motor output.

Includes motor invert, neutral mode, and other features related to motor output.

Parameter list:
public TalonFXSConfiguration WithMotorOutput(MotorOutputConfigs newMotorOutput)

Parameters

newMotorOutput MotorOutputConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithOpenLoopRamps(OpenLoopRampsConfigs)

Modifies this configuration's OpenLoopRamps parameter and returns itself for method-chaining and easier to use config API.

Configs that affect the open-loop control of this motor controller.

Open-loop ramp rates for the various control types.

Parameter list:
public TalonFXSConfiguration WithOpenLoopRamps(OpenLoopRampsConfigs newOpenLoopRamps)

Parameters

newOpenLoopRamps OpenLoopRampsConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithSlot0(Slot0Configs)

Modifies this configuration's Slot0 parameter and returns itself for method-chaining and easier to use config API.

Gains for the specified slot.

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

Parameter list:
public TalonFXSConfiguration WithSlot0(Slot0Configs newSlot0)

Parameters

newSlot0 Slot0Configs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithSlot1(Slot1Configs)

Modifies this configuration's Slot1 parameter and returns itself for method-chaining and easier to use config API.

Gains for the specified slot.

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

Parameter list:
public TalonFXSConfiguration WithSlot1(Slot1Configs newSlot1)

Parameters

newSlot1 Slot1Configs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithSlot2(Slot2Configs)

Modifies this configuration's Slot2 parameter and returns itself for method-chaining and easier to use config API.

Gains for the specified slot.

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

Parameter list:
public TalonFXSConfiguration WithSlot2(Slot2Configs newSlot2)

Parameters

newSlot2 Slot2Configs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs)

Modifies this configuration's SoftwareLimitSwitch parameter and returns itself for method-chaining and easier to use config API.

Configs that affect how software-limit switches behave.

Includes enabling software-limit switches and the threshold at which they are tripped.

Parameter list:
public TalonFXSConfiguration WithSoftwareLimitSwitch(SoftwareLimitSwitchConfigs newSoftwareLimitSwitch)

Parameters

newSoftwareLimitSwitch SoftwareLimitSwitchConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself

WithVoltage(VoltageConfigs)

Modifies this configuration's Voltage parameter and returns itself for method-chaining and easier to use config API.

Configs that affect Voltage control types.

Includes peak output voltages and other configs affecting voltage measurements.

Parameter list:
public TalonFXSConfiguration WithVoltage(VoltageConfigs newVoltage)

Parameters

newVoltage VoltageConfigs

Parameter to modify

Returns

TalonFXSConfiguration

Itself