CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
ctre::phoenix6::hardware::traits::CommonTalon Class Reference

Contains everything common between Talon motor controllers. More...

#include <ctre/phoenix6/hardware/traits/CommonTalon.hpp>

Inheritance diagram for ctre::phoenix6::hardware::traits::CommonTalon:
ctre::phoenix6::hardware::traits::HasTalonControls ctre::phoenix6::hardware::traits::HasTalonSignals ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonDevice ctre::phoenix6::hardware::traits::CommonTalonWithExternalMotor ctre::phoenix6::hardware::traits::CommonTalonWithFOC ctre::phoenix6::hardware::core::CoreTalonFXS ctre::phoenix6::hardware::core::CoreTalonFX ctre::phoenix6::hardware::TalonFXS ctre::phoenix6::hardware::TalonFX

Public Member Functions

virtual ~CommonTalon ()=default
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DutyCycleOut &request)=0
 Request a specified motor duty cycle.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::VoltageOut &request)=0
 Request a specified voltage.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::PositionDutyCycle &request)=0
 Request PID to target position with duty cycle feedforward.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::PositionVoltage &request)=0
 Request PID to target position with voltage feedforward.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::VelocityDutyCycle &request)=0
 Request PID to target velocity with duty cycle feedforward.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::VelocityVoltage &request)=0
 Request PID to target velocity with voltage feedforward.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicDutyCycle &request)=0
 Requests Motion Magic® to target a final position using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVoltage &request)=0
 Requests Motion Magic® to target a final position using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVelocityDutyCycle &request)=0
 Requests Motion Magic® to target a final velocity using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicVelocityVoltage &request)=0
 Requests Motion Magic® to target a final velocity using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicExpoDutyCycle &request)=0
 Requests Motion Magic® to target a final position using an exponential motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::MotionMagicExpoVoltage &request)=0
 Requests Motion Magic® to target a final position using an exponential motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicDutyCycle &request)=0
 Requests Motion Magic® to target a final position using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicVoltage &request)=0
 Requests Motion Magic® to target a final position using a motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicExpoDutyCycle &request)=0
 Requests Motion Magic® Expo to target a final position using an exponential motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DynamicMotionMagicExpoVoltage &request)=0
 Requests Motion Magic® Expo to target a final position using an exponential motion profile.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialDutyCycle &request)=0
 Request a specified motor duty cycle with a differential position closed-loop.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialVoltage &request)=0
 Request a specified voltage with a differential position closed-loop.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialPositionDutyCycle &request)=0
 Request PID to target position with a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialPositionVoltage &request)=0
 Request PID to target position with a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialVelocityDutyCycle &request)=0
 Request PID to target velocity with a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialVelocityVoltage &request)=0
 Request PID to target velocity with a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicDutyCycle &request)=0
 Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVoltage &request)=0
 Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicExpoDutyCycle &request)=0
 Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicExpoVoltage &request)=0
 Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVelocityDutyCycle &request)=0
 Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialMotionMagicVelocityVoltage &request)=0
 Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::Follower &request)=0
 Follow the motor output of another Talon.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::StrictFollower &request)=0
 Follow the motor output of another Talon while ignoring the leader's invert setting.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialFollower &request)=0
 Follow the differential motor output of another Talon.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::DifferentialStrictFollower &request)=0
 Follow the differential motor output of another Talon while ignoring the leader's invert setting.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::StaticBrake &request)=0
 Applies full neutral-brake by shorting motor leads together.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::NeutralOut &request)=0
 Request neutral output of actuator.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::CoastOut &request)=0
 Request coast neutral output of actuator.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Position &request)=0
 Differential control with duty cycle average target and position difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Position &request)=0
 Differential control with position average target and position difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Position &request)=0
 Differential control with velocity average target and position difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Position &request)=0
 Differential control with Motion Magic® average target and position difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Position &request)=0
 Differential control with Motion Magic® Expo average target and position difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Position &request)=0
 Differential control with Motion Magic® Velocity average target and position difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Velocity &request)=0
 Differential control with duty cycle average target and velocity difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Velocity &request)=0
 Differential control with position average target and velocity difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Velocity &request)=0
 Differential control with velocity average target and velocity difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Velocity &request)=0
 Differential control with Motion Magic® average target and velocity difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Velocity &request)=0
 Differential control with Motion Magic® Expo average target and velocity difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Velocity &request)=0
 Differential control with Motion Magic® Velocity average target and velocity difference target using duty cycle control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_DutyCycleOut_Open &request)=0
 Differential control with duty cycle average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionDutyCycle_Open &request)=0
 Differential control with position average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityDutyCycle_Open &request)=0
 Differential control with velocity average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicDutyCycle_Open &request)=0
 Differential control with Motion Magic® average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoDutyCycle_Open &request)=0
 Differential control with Motion Magic® Expo average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityDutyCycle_Open &request)=0
 Differential control with Motion Magic® Velocity average target and duty cycle difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Position &request)=0
 Differential control with voltage average target and position difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Position &request)=0
 Differential control with position average target and position difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Position &request)=0
 Differential control with velocity average target and position difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Position &request)=0
 Differential control with Motion Magic® average target and position difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Position &request)=0
 Differential control with Motion Magic® Expo average target and position difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Position &request)=0
 Differential control with Motion Magic® Velocity average target and position difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Velocity &request)=0
 Differential control with voltage average target and velocity difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Velocity &request)=0
 Differential control with position average target and velocity difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Velocity &request)=0
 Differential control with velocity average target and velocity difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Velocity &request)=0
 Differential control with Motion Magic® average target and velocity difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Velocity &request)=0
 Differential control with Motion Magic® Expo average target and velocity difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Velocity &request)=0
 Differential control with Motion Magic® Velocity average target and velocity difference target using voltage control.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VoltageOut_Open &request)=0
 Differential control with voltage average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_PositionVoltage_Open &request)=0
 Differential control with position average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_VelocityVoltage_Open &request)=0
 Differential control with velocity average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVoltage_Open &request)=0
 Differential control with Motion Magic® average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicExpoVoltage_Open &request)=0
 Differential control with Motion Magic® Expo average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::compound::Diff_MotionMagicVelocityVoltage_Open &request)=0
 Differential control with Motion Magic® Velocity average target and voltage difference target.
 
virtual ctre::phoenix::StatusCode SetControl (const controls::ControlRequest &request)=0
 Control device with generic control request object.
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::HasTalonControls
virtual ~HasTalonControls ()=default
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::CommonDevice
virtual ~CommonDevice ()=default
 
virtual int GetDeviceID () const =0
 
virtual CANBus GetNetwork () const =0
 
virtual uint64_t GetDeviceHash () const =0
 Gets a number unique for this device's hardware type and ID.
 
virtual std::shared_ptr< controls::ControlRequest const > GetAppliedControl () const =0
 Get the latest applied control.
 
virtual std::shared_ptr< controls::ControlRequestGetAppliedControl ()=0
 Get the latest applied control.
 
virtual bool HasResetOccurred ()=0
 
virtual std::function< bool()> GetResetOccurredChecker () const =0
 
virtual bool IsConnected (units::second_t maxLatencySeconds=500_ms)=0
 Returns whether the device is still connected to the robot.
 
virtual ctre::phoenix::StatusCode OptimizeBusUtilization (units::frequency::hertz_t optimizedFreqHz=4_Hz, units::time::second_t timeoutSeconds=100_ms)=0
 Optimizes the device's bus utilization by reducing the update frequencies of its status signals.
 
virtual ctre::phoenix::StatusCode ResetSignalFrequencies (units::time::second_t timeoutSeconds=100_ms)=0
 Resets the update frequencies of all the device's status signals to the defaults.
 
- Public Member Functions inherited from ctre::phoenix6::hardware::traits::HasTalonSignals
virtual ~HasTalonSignals ()=default
 
virtual StatusSignal< int > & GetVersionMajor (bool refresh=true)=0
 App Major Version number.
 
virtual StatusSignal< int > & GetVersionMinor (bool refresh=true)=0
 App Minor Version number.
 
virtual StatusSignal< int > & GetVersionBugfix (bool refresh=true)=0
 App Bugfix Version number.
 
virtual StatusSignal< int > & GetVersionBuild (bool refresh=true)=0
 App Build Version number.
 
virtual StatusSignal< int > & GetVersion (bool refresh=true)=0
 Full Version of firmware in device.
 
virtual StatusSignal< int > & GetFaultField (bool refresh=true)=0
 Integer representing all fault flags reported by the device.
 
virtual StatusSignal< int > & GetStickyFaultField (bool refresh=true)=0
 Integer representing all (persistent) sticky fault flags reported by the device.
 
virtual StatusSignal< units::voltage::volt_t > & GetMotorVoltage (bool refresh=true)=0
 The applied (output) motor voltage.
 
virtual StatusSignal< signals::ForwardLimitValue > & GetForwardLimit (bool refresh=true)=0
 Forward Limit Pin.
 
virtual StatusSignal< signals::ReverseLimitValue > & GetReverseLimit (bool refresh=true)=0
 Reverse Limit Pin.
 
virtual StatusSignal< signals::AppliedRotorPolarityValue > & GetAppliedRotorPolarity (bool refresh=true)=0
 The applied rotor polarity as seen from the front of the motor.
 
virtual StatusSignal< units::dimensionless::scalar_t > & GetDutyCycle (bool refresh=true)=0
 The applied motor duty cycle.
 
virtual StatusSignal< units::current::ampere_t > & GetTorqueCurrent (bool refresh=true)=0
 Current corresponding to the torque output by the motor.
 
virtual StatusSignal< units::current::ampere_t > & GetStatorCurrent (bool refresh=true)=0
 Current corresponding to the stator windings.
 
virtual StatusSignal< units::current::ampere_t > & GetSupplyCurrent (bool refresh=true)=0
 Measured supply side current.
 
virtual StatusSignal< units::voltage::volt_t > & GetSupplyVoltage (bool refresh=true)=0
 Measured supply voltage to the device.
 
virtual StatusSignal< units::temperature::celsius_t > & GetDeviceTemp (bool refresh=true)=0
 Temperature of device.
 
virtual StatusSignal< units::temperature::celsius_t > & GetProcessorTemp (bool refresh=true)=0
 Temperature of the processor.
 
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetRotorVelocity (bool refresh=true)=0
 Velocity of the motor rotor.
 
virtual StatusSignal< units::angle::turn_t > & GetRotorPosition (bool refresh=true)=0
 Position of the motor rotor.
 
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetVelocity (bool refresh=true)=0
 Velocity of the device in mechanism rotations per second.
 
virtual StatusSignal< units::angle::turn_t > & GetPosition (bool refresh=true)=0
 Position of the device in mechanism rotations.
 
virtual StatusSignal< units::angular_acceleration::turns_per_second_squared_t > & GetAcceleration (bool refresh=true)=0
 Acceleration of the device in mechanism rotations per second².
 
virtual StatusSignal< signals::ControlModeValue > & GetControlMode (bool refresh=true)=0
 The active control mode of the motor controller.
 
virtual StatusSignal< bool > & GetMotionMagicAtTarget (bool refresh=true)=0
 Check if the Motion Magic® profile has reached the target.
 
virtual StatusSignal< bool > & GetMotionMagicIsRunning (bool refresh=true)=0
 Check if Motion Magic® is running.
 
virtual StatusSignal< signals::RobotEnableValue > & GetRobotEnable (bool refresh=true)=0
 Indicates if the robot is enabled.
 
virtual StatusSignal< signals::DeviceEnableValue > & GetDeviceEnable (bool refresh=true)=0
 Indicates if device is actuator enabled.
 
virtual StatusSignal< int > & GetClosedLoopSlot (bool refresh=true)=0
 The slot that the closed-loop PID is using.
 
virtual StatusSignal< signals::MotorOutputStatusValue > & GetMotorOutputStatus (bool refresh=true)=0
 Assess the status of the motor output with respect to load and supply.
 
virtual StatusSignal< signals::DifferentialControlModeValue > & GetDifferentialControlMode (bool refresh=true)=0
 The active control mode of the differential controller.
 
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialAverageVelocity (bool refresh=true)=0
 Average component of the differential velocity of device.
 
virtual StatusSignal< units::angle::turn_t > & GetDifferentialAveragePosition (bool refresh=true)=0
 Average component of the differential position of device.
 
virtual StatusSignal< units::angular_velocity::turns_per_second_t > & GetDifferentialDifferenceVelocity (bool refresh=true)=0
 Difference component of the differential velocity of device.
 
virtual StatusSignal< units::angle::turn_t > & GetDifferentialDifferencePosition (bool refresh=true)=0
 Difference component of the differential position of device.
 
virtual StatusSignal< int > & GetDifferentialClosedLoopSlot (bool refresh=true)=0
 The slot that the closed-loop differential PID is using.
 
virtual StatusSignal< ctre::unit::newton_meters_per_ampere_t > & GetMotorKT (bool refresh=true)=0
 The torque constant (K_T) of the motor.
 
virtual StatusSignal< ctre::unit::rpm_per_volt_t > & GetMotorKV (bool refresh=true)=0
 The velocity constant (K_V) of the motor.
 
virtual StatusSignal< units::current::ampere_t > & GetMotorStallCurrent (bool refresh=true)=0
 The stall current of the motor at 12 V output.
 
virtual StatusSignal< signals::BridgeOutputValue > & GetBridgeOutput (bool refresh=true)=0
 The applied output of the bridge.
 
virtual StatusSignal< bool > & GetIsProLicensed (bool refresh=true)=0
 Whether the device is Phoenix Pro licensed.
 
virtual StatusSignal< units::temperature::celsius_t > & GetAncillaryDeviceTemp (bool refresh=true)=0
 Temperature of device from second sensor.
 
virtual StatusSignal< signals::ConnectedMotorValue > & GetConnectedMotor (bool refresh=true)=0
 The type of motor attached to the Talon.
 
virtual StatusSignal< bool > & GetFault_Hardware (bool refresh=true)=0
 Hardware fault occurred.
 
virtual StatusSignal< bool > & GetStickyFault_Hardware (bool refresh=true)=0
 Hardware fault occurred.
 
virtual StatusSignal< bool > & GetFault_ProcTemp (bool refresh=true)=0
 Processor temperature exceeded limit.
 
virtual StatusSignal< bool > & GetStickyFault_ProcTemp (bool refresh=true)=0
 Processor temperature exceeded limit.
 
virtual StatusSignal< bool > & GetFault_DeviceTemp (bool refresh=true)=0
 Device temperature exceeded limit.
 
virtual StatusSignal< bool > & GetStickyFault_DeviceTemp (bool refresh=true)=0
 Device temperature exceeded limit.
 
virtual StatusSignal< bool > & GetFault_Undervoltage (bool refresh=true)=0
 Device supply voltage dropped to near brownout levels.
 
virtual StatusSignal< bool > & GetStickyFault_Undervoltage (bool refresh=true)=0
 Device supply voltage dropped to near brownout levels.
 
virtual StatusSignal< bool > & GetFault_BootDuringEnable (bool refresh=true)=0
 Device boot while detecting the enable signal.
 
virtual StatusSignal< bool > & GetStickyFault_BootDuringEnable (bool refresh=true)=0
 Device boot while detecting the enable signal.
 
virtual StatusSignal< bool > & GetFault_UnlicensedFeatureInUse (bool refresh=true)=0
 An unlicensed feature is in use, device may not behave as expected.
 
virtual StatusSignal< bool > & GetStickyFault_UnlicensedFeatureInUse (bool refresh=true)=0
 An unlicensed feature is in use, device may not behave as expected.
 
virtual StatusSignal< bool > & GetFault_BridgeBrownout (bool refresh=true)=0
 Bridge was disabled most likely due to supply voltage dropping too low.
 
virtual StatusSignal< bool > & GetStickyFault_BridgeBrownout (bool refresh=true)=0
 Bridge was disabled most likely due to supply voltage dropping too low.
 
virtual StatusSignal< bool > & GetFault_RemoteSensorReset (bool refresh=true)=0
 The remote sensor has reset.
 
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorReset (bool refresh=true)=0
 The remote sensor has reset.
 
virtual StatusSignal< bool > & GetFault_MissingDifferentialFX (bool refresh=true)=0
 The remote Talon used for differential control is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetStickyFault_MissingDifferentialFX (bool refresh=true)=0
 The remote Talon used for differential control is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetFault_RemoteSensorPosOverflow (bool refresh=true)=0
 The remote sensor position has overflowed.
 
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorPosOverflow (bool refresh=true)=0
 The remote sensor position has overflowed.
 
virtual StatusSignal< bool > & GetFault_OverSupplyV (bool refresh=true)=0
 Supply Voltage has exceeded the maximum voltage rating of device.
 
virtual StatusSignal< bool > & GetStickyFault_OverSupplyV (bool refresh=true)=0
 Supply Voltage has exceeded the maximum voltage rating of device.
 
virtual StatusSignal< bool > & GetFault_UnstableSupplyV (bool refresh=true)=0
 Supply Voltage is unstable.
 
virtual StatusSignal< bool > & GetStickyFault_UnstableSupplyV (bool refresh=true)=0
 Supply Voltage is unstable.
 
virtual StatusSignal< bool > & GetFault_ReverseHardLimit (bool refresh=true)=0
 Reverse limit switch has been asserted.
 
virtual StatusSignal< bool > & GetStickyFault_ReverseHardLimit (bool refresh=true)=0
 Reverse limit switch has been asserted.
 
virtual StatusSignal< bool > & GetFault_ForwardHardLimit (bool refresh=true)=0
 Forward limit switch has been asserted.
 
virtual StatusSignal< bool > & GetStickyFault_ForwardHardLimit (bool refresh=true)=0
 Forward limit switch has been asserted.
 
virtual StatusSignal< bool > & GetFault_ReverseSoftLimit (bool refresh=true)=0
 Reverse soft limit has been asserted.
 
virtual StatusSignal< bool > & GetStickyFault_ReverseSoftLimit (bool refresh=true)=0
 Reverse soft limit has been asserted.
 
virtual StatusSignal< bool > & GetFault_ForwardSoftLimit (bool refresh=true)=0
 Forward soft limit has been asserted.
 
virtual StatusSignal< bool > & GetStickyFault_ForwardSoftLimit (bool refresh=true)=0
 Forward soft limit has been asserted.
 
virtual StatusSignal< bool > & GetFault_MissingSoftLimitRemote (bool refresh=true)=0
 The remote soft limit device is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetStickyFault_MissingSoftLimitRemote (bool refresh=true)=0
 The remote soft limit device is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetFault_MissingHardLimitRemote (bool refresh=true)=0
 The remote limit switch device is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetStickyFault_MissingHardLimitRemote (bool refresh=true)=0
 The remote limit switch device is not present on CAN Bus.
 
virtual StatusSignal< bool > & GetFault_RemoteSensorDataInvalid (bool refresh=true)=0
 The remote sensor's data is no longer trusted.
 
virtual StatusSignal< bool > & GetStickyFault_RemoteSensorDataInvalid (bool refresh=true)=0
 The remote sensor's data is no longer trusted.
 
virtual StatusSignal< bool > & GetFault_FusedSensorOutOfSync (bool refresh=true)=0
 The remote sensor used for fusion has fallen out of sync to the local sensor.
 
virtual StatusSignal< bool > & GetStickyFault_FusedSensorOutOfSync (bool refresh=true)=0
 The remote sensor used for fusion has fallen out of sync to the local sensor.
 
virtual StatusSignal< bool > & GetFault_StatorCurrLimit (bool refresh=true)=0
 Stator current limit occured.
 
virtual StatusSignal< bool > & GetStickyFault_StatorCurrLimit (bool refresh=true)=0
 Stator current limit occured.
 
virtual StatusSignal< bool > & GetFault_SupplyCurrLimit (bool refresh=true)=0
 Supply current limit occured.
 
virtual StatusSignal< bool > & GetStickyFault_SupplyCurrLimit (bool refresh=true)=0
 Supply current limit occured.
 
virtual StatusSignal< bool > & GetFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true)=0
 Using Fused CANcoder feature while unlicensed.
 
virtual StatusSignal< bool > & GetStickyFault_UsingFusedCANcoderWhileUnlicensed (bool refresh=true)=0
 Using Fused CANcoder feature while unlicensed.
 
virtual StatusSignal< bool > & GetFault_StaticBrakeDisabled (bool refresh=true)=0
 Static brake was momentarily disabled due to excessive braking current while disabled.
 
virtual StatusSignal< bool > & GetStickyFault_StaticBrakeDisabled (bool refresh=true)=0
 Static brake was momentarily disabled due to excessive braking current while disabled.
 
virtual StatusSignal< double > & GetClosedLoopProportionalOutput (bool refresh=true)=0
 Closed loop proportional component.
 
virtual StatusSignal< double > & GetClosedLoopIntegratedOutput (bool refresh=true)=0
 Closed loop integrated component.
 
virtual StatusSignal< double > & GetClosedLoopFeedForward (bool refresh=true)=0
 Feedforward passed by the user.
 
virtual StatusSignal< double > & GetClosedLoopDerivativeOutput (bool refresh=true)=0
 Closed loop derivative component.
 
virtual StatusSignal< double > & GetClosedLoopOutput (bool refresh=true)=0
 Closed loop total output.
 
virtual StatusSignal< double > & GetClosedLoopReference (bool refresh=true)=0
 Value that the closed loop is targeting.
 
virtual StatusSignal< double > & GetClosedLoopReferenceSlope (bool refresh=true)=0
 Derivative of the target that the closed loop is targeting.
 
virtual StatusSignal< double > & GetClosedLoopError (bool refresh=true)=0
 The difference between target reference and current measurement.
 
virtual StatusSignal< double > & GetDifferentialOutput (bool refresh=true)=0
 The calculated motor output for differential followers.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopProportionalOutput (bool refresh=true)=0
 Differential closed loop proportional component.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopIntegratedOutput (bool refresh=true)=0
 Differential closed loop integrated component.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopFeedForward (bool refresh=true)=0
 Differential Feedforward passed by the user.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopDerivativeOutput (bool refresh=true)=0
 Differential closed loop derivative component.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopOutput (bool refresh=true)=0
 Differential closed loop total output.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopReference (bool refresh=true)=0
 Value that the differential closed loop is targeting.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopReferenceSlope (bool refresh=true)=0
 Derivative of the target that the differential closed loop is targeting.
 
virtual StatusSignal< double > & GetDifferentialClosedLoopError (bool refresh=true)=0
 The difference between target differential reference and current measurement.
 
virtual ctre::phoenix::StatusCode SetPosition (units::angle::turn_t newValue, units::time::second_t timeoutSeconds)=0
 Sets the mechanism position of the device in mechanism rotations.
 
virtual ctre::phoenix::StatusCode SetPosition (units::angle::turn_t newValue)=0
 Sets the mechanism position of the device in mechanism rotations.
 
virtual ctre::phoenix::StatusCode ClearStickyFaults (units::time::second_t timeoutSeconds)=0
 Clear the sticky faults in the device.
 
virtual ctre::phoenix::StatusCode ClearStickyFaults ()=0
 Clear the sticky faults in the device.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_Hardware (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Hardware fault occurred.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_Hardware ()=0
 Clear sticky fault: Hardware fault occurred.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ProcTemp (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Processor temperature exceeded limit.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ProcTemp ()=0
 Clear sticky fault: Processor temperature exceeded limit.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Device temperature exceeded limit.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_DeviceTemp ()=0
 Clear sticky fault: Device temperature exceeded limit.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_Undervoltage (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Device supply voltage dropped to near brownout levels.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_Undervoltage ()=0
 Clear sticky fault: Device supply voltage dropped to near brownout levels.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Device boot while detecting the enable signal.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_BootDuringEnable ()=0
 Clear sticky fault: Device boot while detecting the enable signal.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UnlicensedFeatureInUse ()=0
 Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_BridgeBrownout ()=0
 Clear sticky fault: Bridge was disabled most likely due to supply voltage dropping too low.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote sensor has reset.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorReset ()=0
 Clear sticky fault: The remote sensor has reset.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingDifferentialFX ()=0
 Clear sticky fault: The remote Talon used for differential control is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote sensor position has overflowed.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorPosOverflow ()=0
 Clear sticky fault: The remote sensor position has overflowed.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_OverSupplyV ()=0
 Clear sticky fault: Supply Voltage has exceeded the maximum voltage rating of device.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Supply Voltage is unstable.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UnstableSupplyV ()=0
 Clear sticky fault: Supply Voltage is unstable.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Reverse limit switch has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseHardLimit ()=0
 Clear sticky fault: Reverse limit switch has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Forward limit switch has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardHardLimit ()=0
 Clear sticky fault: Forward limit switch has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Reverse soft limit has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ReverseSoftLimit ()=0
 Clear sticky fault: Reverse soft limit has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Forward soft limit has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_ForwardSoftLimit ()=0
 Clear sticky fault: Forward soft limit has been asserted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote soft limit device is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingSoftLimitRemote ()=0
 Clear sticky fault: The remote soft limit device is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote limit switch device is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_MissingHardLimitRemote ()=0
 Clear sticky fault: The remote limit switch device is not present on CAN Bus.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote sensor's data is no longer trusted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_RemoteSensorDataInvalid ()=0
 Clear sticky fault: The remote sensor's data is no longer trusted.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_FusedSensorOutOfSync ()=0
 Clear sticky fault: The remote sensor used for fusion has fallen out of sync to the local sensor.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Stator current limit occured.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_StatorCurrLimit ()=0
 Clear sticky fault: Stator current limit occured.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Supply current limit occured.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_SupplyCurrLimit ()=0
 Clear sticky fault: Supply current limit occured.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Using Fused CANcoder feature while unlicensed.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_UsingFusedCANcoderWhileUnlicensed ()=0
 Clear sticky fault: Using Fused CANcoder feature while unlicensed.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled (units::time::second_t timeoutSeconds)=0
 Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disabled.
 
virtual ctre::phoenix::StatusCode ClearStickyFault_StaticBrakeDisabled ()=0
 Clear sticky fault: Static brake was momentarily disabled due to excessive braking current while disabled.
 

Detailed Description

Contains everything common between Talon motor controllers.

Constructor & Destructor Documentation

◆ ~CommonTalon()

virtual ctre::phoenix6::hardware::traits::CommonTalon::~CommonTalon ( )
virtualdefault

Member Function Documentation

◆ SetControl() [1/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::CoastOut & request)
virtual

Request coast neutral output of actuator.

The bridge is disabled and the rotor is allowed to coast.

  • CoastOut Parameters:
    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [2/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_DutyCycleOut_Open & request)
virtual

Differential control with duty cycle average target and duty cycle difference target.

  • Diff_DutyCycleOut_Open Parameters:
    • AverageRequest: Average DutyCycleOut request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [3/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_DutyCycleOut_Position & request)
virtual

Differential control with duty cycle average target and position difference target.

  • Diff_DutyCycleOut_Position Parameters:
    • AverageRequest: Average DutyCycleOut request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [4/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_DutyCycleOut_Velocity & request)
virtual

Differential control with duty cycle average target and velocity difference target.

  • Diff_DutyCycleOut_Velocity Parameters:
    • AverageRequest: Average DutyCycleOut request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [5/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicDutyCycle_Open & request)
virtual

Differential control with Motion Magic® average target and duty cycle difference target.

  • Diff_MotionMagicDutyCycle_Open Parameters:
    • AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [6/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicDutyCycle_Position & request)
virtual

Differential control with Motion Magic® average target and position difference target using duty cycle control.

  • Diff_MotionMagicDutyCycle_Position Parameters:
    • AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [7/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicDutyCycle_Velocity & request)
virtual

Differential control with Motion Magic® average target and velocity difference target using duty cycle control.

  • Diff_MotionMagicDutyCycle_Velocity Parameters:
    • AverageRequest: Average MotionMagicDutyCycle request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [8/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoDutyCycle_Open & request)
virtual

Differential control with Motion Magic® Expo average target and duty cycle difference target.

  • Diff_MotionMagicExpoDutyCycle_Open Parameters:
    • AverageRequest: Average MotionMagicExpoDutyCycle request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [9/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoDutyCycle_Position & request)
virtual

Differential control with Motion Magic® Expo average target and position difference target using duty cycle control.

  • Diff_MotionMagicExpoDutyCycle_Position Parameters:
    • AverageRequest: Average MotionMagicExpoDutyCycle request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [10/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoDutyCycle_Velocity & request)
virtual

Differential control with Motion Magic® Expo average target and velocity difference target using duty cycle control.

  • Diff_MotionMagicExpoDutyCycle_Velocity Parameters:
    • AverageRequest: Average MotionMagicExpoDutyCycle request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [11/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoVoltage_Open & request)
virtual

Differential control with Motion Magic® Expo average target and voltage difference target.

  • Diff_MotionMagicExpoVoltage_Open Parameters:
    • AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [12/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoVoltage_Position & request)
virtual

Differential control with Motion Magic® Expo average target and position difference target using voltage control.

  • Diff_MotionMagicExpoVoltage_Position Parameters:
    • AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [13/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicExpoVoltage_Velocity & request)
virtual

Differential control with Motion Magic® Expo average target and velocity difference target using voltage control.

  • Diff_MotionMagicExpoVoltage_Velocity Parameters:
    • AverageRequest: Average MotionMagicExpoVoltage request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [14/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityDutyCycle_Open & request)
virtual

Differential control with Motion Magic® Velocity average target and duty cycle difference target.

  • Diff_MotionMagicVelocityDutyCycle_Open Parameters:
    • AverageRequest: Average MotionMagicVelocityDutyCycle request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [15/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityDutyCycle_Position & request)
virtual

Differential control with Motion Magic® Velocity average target and position difference target using duty cycle control.

  • Diff_MotionMagicVelocityDutyCycle_Position Parameters:
    • AverageRequest: Average MotionMagicVelocityDutyCycle request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [16/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityDutyCycle_Velocity & request)
virtual

Differential control with Motion Magic® Velocity average target and velocity difference target using duty cycle control.

  • Diff_MotionMagicVelocityDutyCycle_Velocity Parameters:
    • AverageRequest: Average MotionMagicVelocityDutyCycle request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [17/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityVoltage_Open & request)
virtual

Differential control with Motion Magic® Velocity average target and voltage difference target.

  • Diff_MotionMagicVelocityVoltage_Open Parameters:
    • AverageRequest: Average MotionMagicVelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [18/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityVoltage_Position & request)
virtual

Differential control with Motion Magic® Velocity average target and position difference target using voltage control.

  • Diff_MotionMagicVelocityVoltage_Position Parameters:
    • AverageRequest: Average MotionMagicVelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [19/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVelocityVoltage_Velocity & request)
virtual

Differential control with Motion Magic® Velocity average target and velocity difference target using voltage control.

  • Diff_MotionMagicVelocityVoltage_Velocity Parameters:
    • AverageRequest: Average MotionMagicVelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [20/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVoltage_Open & request)
virtual

Differential control with Motion Magic® average target and voltage difference target.

  • Diff_MotionMagicVoltage_Open Parameters:
    • AverageRequest: Average MotionMagicVoltage request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [21/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVoltage_Position & request)
virtual

Differential control with Motion Magic® average target and position difference target using voltage control.

  • Diff_MotionMagicVoltage_Position Parameters:
    • AverageRequest: Average MotionMagicVoltage request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [22/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_MotionMagicVoltage_Velocity & request)
virtual

Differential control with Motion Magic® average target and velocity difference target using voltage control.

  • Diff_MotionMagicVoltage_Velocity Parameters:
    • AverageRequest: Average MotionMagicVoltage request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [23/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionDutyCycle_Open & request)
virtual

Differential control with position average target and duty cycle difference target.

  • Diff_PositionDutyCycle_Open Parameters:
    • AverageRequest: Average PositionDutyCycle request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [24/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionDutyCycle_Position & request)
virtual

Differential control with position average target and position difference target using duty cycle control.

  • Diff_PositionDutyCycle_Position Parameters:
    • AverageRequest: Average PositionDutyCycle request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [25/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionDutyCycle_Velocity & request)
virtual

Differential control with position average target and velocity difference target using duty cycle control.

  • Diff_PositionDutyCycle_Velocity Parameters:
    • AverageRequest: Average PositionDutyCycle request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [26/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionVoltage_Open & request)
virtual

Differential control with position average target and voltage difference target.

  • Diff_PositionVoltage_Open Parameters:
    • AverageRequest: Average PositionVoltage request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [27/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionVoltage_Position & request)
virtual

Differential control with position average target and position difference target using voltage control.

  • Diff_PositionVoltage_Position Parameters:
    • AverageRequest: Average PositionVoltage request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [28/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_PositionVoltage_Velocity & request)
virtual

Differential control with position average target and velocity difference target using voltage control.

  • Diff_PositionVoltage_Velocity Parameters:
    • AverageRequest: Average PositionVoltage request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [29/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityDutyCycle_Open & request)
virtual

Differential control with velocity average target and duty cycle difference target.

  • Diff_VelocityDutyCycle_Open Parameters:
    • AverageRequest: Average VelocityDutyCYcle request of the mechanism.
    • DifferentialRequest: Differential DutyCycleOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [30/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityDutyCycle_Position & request)
virtual

Differential control with velocity average target and position difference target using duty cycle control.

  • Diff_VelocityDutyCycle_Position Parameters:
    • AverageRequest: Average VelocityDutyCYcle request of the mechanism.
    • DifferentialRequest: Differential PositionDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [31/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityDutyCycle_Velocity & request)
virtual

Differential control with velocity average target and velocity difference target using duty cycle control.

  • Diff_VelocityDutyCycle_Velocity Parameters:
    • AverageRequest: Average VelocityDutyCycle request of the mechanism.
    • DifferentialRequest: Differential VelocityDutyCycle request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [32/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityVoltage_Open & request)
virtual

Differential control with velocity average target and voltage difference target.

  • Diff_VelocityVoltage_Open Parameters:
    • AverageRequest: Average VelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [33/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityVoltage_Position & request)
virtual

Differential control with velocity average target and position difference target using voltage control.

  • Diff_VelocityVoltage_Position Parameters:
    • AverageRequest: Average VelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [34/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VelocityVoltage_Velocity & request)
virtual

Differential control with velocity average target and velocity difference target using voltage control.

  • Diff_VelocityVoltage_Velocity Parameters:
    • AverageRequest: Average VelocityVoltage request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [35/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VoltageOut_Open & request)
virtual

Differential control with voltage average target and voltage difference target.

  • Diff_VoltageOut_Open Parameters:
    • AverageRequest: Average VoltageOut request of the mechanism.
    • DifferentialRequest: Differential VoltageOut request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [36/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VoltageOut_Position & request)
virtual

Differential control with voltage average target and position difference target.

  • Diff_VoltageOut_Position Parameters:
    • AverageRequest: Average VoltageOut request of the mechanism.
    • DifferentialRequest: Differential PositionVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [37/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::compound::Diff_VoltageOut_Velocity & request)
virtual

Differential control with voltage average target and velocity difference target.

  • Diff_VoltageOut_Velocity Parameters:
    • AverageRequest: Average VoltageOut request of the mechanism.
    • DifferentialRequest: Differential VelocityVoltage request of the mechanism.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [38/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::ControlRequest & request)
virtual

Control device with generic control request object.

User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, ctre::phoenix6::hardware::core::CoreTalonFXS, and ctre::phoenix6::hardware::traits::CommonTalonWithFOC.

◆ SetControl() [39/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialDutyCycle & request)
virtual

Request a specified motor duty cycle with a differential position closed-loop.

This control mode will output a proportion of the supplied voltage which is supplied by the user. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialDutyCycle Parameters:
    • AverageOutput: Proportion of supply voltage to apply on the Average axis in fractional units between -1 and +1.
    • DifferentialPosition: Differential position to drive towards in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [40/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialFollower & request)
virtual

Follow the differential motor output of another Talon.

If Talon is in torque control, the differential torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the differential duty cycle is matched. If Talon is in voltage output control, the differential motor voltage is matched. Motor direction either matches leader's configured direction or opposes it based on the MotorAlignment.

The leader must enable its DifferentialOutput status signal. The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz.

  • DifferentialFollower Parameters:
    • LeaderID: Device ID of the differential leader to follow.
    • MotorAlignment: Set to Aligned for motor invert to match the leader's configured Invert - which is typical when leader and follower are mechanically linked and spin in the same direction. Set to Opposed for motor invert to oppose the leader's configured Invert - this is typical where the leader and follower mechanically spin in opposite directions.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [41/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicDutyCycle & request)
virtual

Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and (optional) Jerk specified via the Motion Magic® configuration values. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • DifferentialMotionMagicDutyCycle Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [42/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicExpoDutyCycle & request)
virtual

Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Note that unlike the slot gains, the Expo_kV and Expo_kA configs are always in output units of Volts.

Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • DifferentialMotionMagicExpoDutyCycle Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [43/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicExpoVoltage & request)
virtual

Requests Motion Magic® to target a final position using an exponential motion profile, and PID to a differential position setpoint.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Note that unlike the slot gains, the Expo_kV and Expo_kA configs are always in output units of Volts.

Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • DifferentialMotionMagicExpoVoltage Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [44/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicVelocityDutyCycle & request)
virtual

Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.

This allows smooth transitions between velocity set points.

Motion Magic® Velocity produces a motion profile in real-time while attempting to honor the specified Acceleration and (optional) Jerk. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs.

Acceleration and jerk are specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile.

Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • DifferentialMotionMagicVelocityDutyCycle Parameters:
    • AverageVelocity: Average velocity to drive toward in rotations per second.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [45/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicVelocityVoltage & request)
virtual

Requests Motion Magic® to target a final velocity using a motion profile, and PID to a differential position setpoint.

This allows smooth transitions between velocity set points.

Motion Magic® Velocity produces a motion profile in real-time while attempting to honor the specified Acceleration and (optional) Jerk. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs.

Acceleration and jerk are specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile.

Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • DifferentialMotionMagicVelocityVoltage Parameters:
    • AverageVelocity: Average velocity to drive toward in rotations per second.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [46/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialMotionMagicVoltage & request)
virtual

Requests Motion Magic® to target a final position using a motion profile, and PID to a differential position setpoint.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and (optional) Jerk specified via the Motion Magic® configuration values. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • DifferentialMotionMagicVoltage Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [47/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialPositionDutyCycle & request)
virtual

Request PID to target position with a differential position setpoint.

This control mode will set the motor's position setpoint to the position specified by the user. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialPositionDutyCycle Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [48/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialPositionVoltage & request)
virtual

Request PID to target position with a differential position setpoint.

This control mode will set the motor's position setpoint to the position specified by the user. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialPositionVoltage Parameters:
    • AveragePosition: Average position to drive toward in rotations.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [49/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialStrictFollower & request)
virtual

Follow the differential motor output of another Talon while ignoring the leader's invert setting.

If Talon is in torque control, the differential torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the differential duty cycle is matched. If Talon is in voltage output control, the differential motor voltage is matched. Motor direction is strictly determined by the configured invert and not the leader. If you want motor direction to match or oppose the leader, use DifferentialFollower instead.

The leader must enable its DifferentialOutput status signal. The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz.

  • DifferentialStrictFollower Parameters:
    • LeaderID: Device ID of the differential leader to follow.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [50/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialVelocityDutyCycle & request)
virtual

Request PID to target velocity with a differential position setpoint.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialVelocityDutyCycle Parameters:
    • AverageVelocity: Average velocity to drive toward in rotations per second.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [51/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialVelocityVoltage & request)
virtual

Request PID to target velocity with a differential position setpoint.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialVelocityVoltage Parameters:
    • AverageVelocity: Average velocity to drive toward in rotations per second.
    • DifferentialPosition: Differential position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • AverageSlot: Select which gains are applied to the average controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [52/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DifferentialVoltage & request)
virtual

Request a specified voltage with a differential position closed-loop.

This control mode will attempt to apply the specified voltage to the motor. If the supply voltage is below the requested voltage, the motor controller will output the supply voltage. It will also set the motor's differential position setpoint to the specified position.

  • DifferentialVoltage Parameters:
    • AverageOutput: Voltage to attempt to drive at on the Average axis.
    • DifferentialPosition: Differential position to drive towards in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • DifferentialSlot: Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [53/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DutyCycleOut & request)
virtual

Request a specified motor duty cycle.

This control mode will output a proportion of the supplied voltage which is supplied by the user.

  • DutyCycleOut Parameters:
    • Output: Proportion of supply voltage to apply in fractional units between -1 and +1
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [54/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DynamicMotionMagicDutyCycle & request)
virtual

Requests Motion Magic® to target a final position using a motion profile.

This dynamic request allows runtime changes to Cruise Velocity, Acceleration, and (optional) Jerk. Users can optionally provide a duty cycle feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise Velocity, Acceleration, and (optional) Jerk. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • DynamicMotionMagicDutyCycle Parameters:
    • Position: Position to drive toward in rotations.
    • Velocity: Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
    • Acceleration: Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation
    • Jerk: Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.

      Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.

    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [55/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DynamicMotionMagicExpoDutyCycle & request)
virtual

Requests Motion Magic® Expo to target a final position using an exponential motion profile.

This dynamic request allows runtime changes to the profile kV, kA, and (optional) Cruise Velocity. Users can optionally provide a duty cycle feedforward.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the specified Cruise Velocity (optional) and the mechanism kV and kA. Note that unlike the slot gains, the Expo_kV and Expo_kA parameters are always in output units of Volts.

Setting the Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • DynamicMotionMagicExpoDutyCycle Parameters:
    • Position: Position to drive toward in rotations.
    • kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always in units of V/rps.

      This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.

    • kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always in units of V/rps².

      This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.

    • Velocity: Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation. Setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [56/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DynamicMotionMagicExpoVoltage & request)
virtual

Requests Motion Magic® Expo to target a final position using an exponential motion profile.

This dynamic request allows runtime changes to the profile kV, kA, and (optional) Cruise Velocity. Users can optionally provide a voltage feedforward.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the specified Cruise Velocity (optional) and the mechanism kV and kA. Note that unlike the slot gains, the Expo_kV and Expo_kA parameters are always in output units of Volts.

Setting the Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • DynamicMotionMagicExpoVoltage Parameters:
    • Position: Position to drive toward in rotations.
    • kV: Mechanism kV for profiling. Unlike the kV slot gain, this is always in units of V/rps.

      This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.

    • kA: Mechanism kA for profiling. Unlike the kA slot gain, this is always in units of V/rps².

      This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.

    • Velocity: Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation. Setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [57/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::DynamicMotionMagicVoltage & request)
virtual

Requests Motion Magic® to target a final position using a motion profile.

This dynamic request allows runtime changes to Cruise Velocity, Acceleration, and (optional) Jerk. Users can optionally provide a voltage feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise Velocity, Acceleration, and (optional) Jerk. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • DynamicMotionMagicVoltage Parameters:
    • Position: Position to drive toward in rotations.
    • Velocity: Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
    • Acceleration: Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
    • Jerk: Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.

      Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.

    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [58/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::Follower & request)
virtual

Follow the motor output of another Talon.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the duty cycle is matched. If Talon is in voltage output control, the motor voltage is matched. Motor direction either matches the leader's configured direction or opposes it based on the MotorAlignment.

The leader must enable the status signal corresponding to its control output type (DutyCycle, MotorVoltage, TorqueCurrent). The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz.

  • Follower Parameters:
    • LeaderID: Device ID of the leader to follow.
    • MotorAlignment: Set to Aligned for motor invert to match the leader's configured Invert - which is typical when leader and follower are mechanically linked and spin in the same direction. Set to Opposed for motor invert to oppose the leader's configured Invert - this is typical where the leader and follower mechanically spin in opposite directions.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [59/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicDutyCycle & request)
virtual

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a duty cycle feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and (optional) Jerk specified via the Motion Magic® configuration values. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • MotionMagicDutyCycle Parameters:
    • Position: Position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [60/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicExpoDutyCycle & request)
virtual

Requests Motion Magic® to target a final position using an exponential motion profile.

Users can optionally provide a duty cycle feedforward.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Note that unlike the slot gains, the Expo_kV and Expo_kA configs are always in output units of Volts.

Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • MotionMagicExpoDutyCycle Parameters:
    • Position: Position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [61/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicExpoVoltage & request)
virtual

Requests Motion Magic® to target a final position using an exponential motion profile.

Users can optionally provide a voltage feedforward.

Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Note that unlike the slot gains, the Expo_kV and Expo_kA configs are always in output units of Volts.

Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • MotionMagicExpoVoltage Parameters:
    • Position: Position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [62/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicVelocityDutyCycle & request)
virtual

Requests Motion Magic® to target a final velocity using a motion profile.

This allows smooth transitions between velocity set points. Users can optionally provide a duty cycle feedforward.

Motion Magic® Velocity produces a motion profile in real-time while attempting to honor the specified Acceleration and (optional) Jerk. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs.

If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile.

Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

  • MotionMagicVelocityDutyCycle Parameters:
    • Velocity: Target velocity to drive toward in rotations per second. This can be changed on-the fly.
    • Acceleration: This is the absolute Acceleration to use generating the profile. If this parameter is zero, the Acceleration persistent configuration parameter is used instead. Acceleration is in rotations per second squared. If nonzero, the signage does not matter as the absolute value is used.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [63/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicVelocityVoltage & request)
virtual

Requests Motion Magic® to target a final velocity using a motion profile.

This allows smooth transitions between velocity set points. Users can optionally provide a voltage feedforward.

Motion Magic® Velocity produces a motion profile in real-time while attempting to honor the specified Acceleration and (optional) Jerk. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs.

If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile.

Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • MotionMagicVelocityVoltage Parameters:
    • Velocity: Target velocity to drive toward in rotations per second. This can be changed on-the fly.
    • Acceleration: This is the absolute Acceleration to use generating the profile. If this parameter is zero, the Acceleration persistent configuration parameter is used instead. Acceleration is in rotations per second squared. If nonzero, the signage does not matter as the absolute value is used.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [64/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::MotionMagicVoltage & request)
virtual

Requests Motion Magic® to target a final position using a motion profile.

Users can optionally provide a voltage feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and (optional) Jerk specified via the Motion Magic® configuration values. This control mode does not use the Expo_kV or Expo_kA configs.

Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

  • MotionMagicVoltage Parameters:
    • Position: Position to drive toward in rotations.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [65/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::NeutralOut & request)
virtual

Request neutral output of actuator.

The applied brake type is determined by the NeutralMode configuration.

  • NeutralOut Parameters:
    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [66/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::PositionDutyCycle & request)
virtual

Request PID to target position with duty cycle feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional duty cycle as an arbitrary feedforward value.

  • PositionDutyCycle Parameters:
    • Position: Position to drive toward in rotations.
    • Velocity: Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [67/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::PositionVoltage & request)
virtual

Request PID to target position with voltage feedforward.

This control mode will set the motor's position setpoint to the position specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

  • PositionVoltage Parameters:
    • Position: Position to drive toward in rotations.
    • Velocity: Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [68/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::StaticBrake & request)
virtual

Applies full neutral-brake by shorting motor leads together.

  • StaticBrake Parameters:
    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [69/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::StrictFollower & request)
virtual

Follow the motor output of another Talon while ignoring the leader's invert setting.

If Talon is in torque control, the torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the duty cycle is matched. If Talon is in voltage output control, the motor voltage is matched. Motor direction is strictly determined by the configured invert and not the leader. If you want motor direction to match or oppose the leader, use Follower instead.

The leader must enable the status signal corresponding to its control output type (DutyCycle, MotorVoltage, TorqueCurrent). The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz.

  • StrictFollower Parameters:
    • LeaderID: Device ID of the leader to follow.
Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [70/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::VelocityDutyCycle & request)
virtual

Request PID to target velocity with duty cycle feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

  • VelocityDutyCycle Parameters:
    • Velocity: Velocity to drive toward in rotations per second.
    • Acceleration: Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [71/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::VelocityVoltage & request)
virtual

Request PID to target velocity with voltage feedforward.

This control mode will set the motor's velocity setpoint to the velocity specified by the user. In addition, it will apply an additional voltage as an arbitrary feedforward value.

  • VelocityVoltage Parameters:
    • Velocity: Velocity to drive toward in rotations per second.
    • Acceleration: Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • FeedForward: Feedforward to apply in volts This is added to the output of the onboard feedforward terms.
    • Slot: Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.

◆ SetControl() [72/72]

virtual ctre::phoenix::StatusCode ctre::phoenix6::hardware::traits::HasTalonControls::SetControl ( const controls::VoltageOut & request)
virtual

Request a specified voltage.

This control mode will attempt to apply the specified voltage to the motor. If the supply voltage is below the requested voltage, the motor controller will output the supply voltage.

  • VoltageOut Parameters:
    • Output: Voltage to attempt to drive at
    • EnableFOC: Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see hardware::traits::SupportsFOC). Set to false to use trapezoidal commutation.

      FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.

    • OverrideBrakeDurNeutral: Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
    • LimitForwardMotion: Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • LimitReverseMotion: Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
    • IgnoreHardwareLimits: Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion parameters, instead allowing motion.

      This can be useful on mechanisms such as an intake/feeder, where a limit switch stops motion while intaking but should be ignored when feeding to a shooter.

      The hardware limit faults and Forward/ReverseLimit signals will still report the values of the limit switches regardless of this parameter.

    • IgnoreSoftwareLimits: Set to true to ignore software limits, instead allowing motion.

      This can be useful when calibrating the zero point of a mechanism such as an elevator.

      The software limit faults will still report the values of the software limits regardless of this parameter.

    • UseTimesync: Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

      This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.

Parameters
requestControl object to request of the device
Returns
Status Code of the request, 0 is OK

Implements ctre::phoenix6::hardware::traits::HasTalonControls.

Reimplemented in ctre::phoenix6::hardware::core::CoreTalonFX, and ctre::phoenix6::hardware::core::CoreTalonFXS.


The documentation for this class was generated from the following file: