Table of Contents

Interface HasTalonControls

Namespace
CTRE.Phoenix6.Hardware.Traits
Assembly
Phoenix6.Hardware.dll

Contains all control functions available for devices that support Talon controls.

public interface HasTalonControls : CommonDevice
Inherited Members

Methods

SetControl(CoastOut)

Request coast neutral output of actuator. The bridge is disabled and the rotor is allowed to coast.

CoastOut Parameters

  • UseTimesyncSet 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.
StatusCode SetControl(CoastOut request)

Parameters

request CoastOut

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_DutyCycleOut_Open)

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

Diff_DutyCycleOut_Open Parameters

  • AverageRequestAverage DutyCycleOut request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_DutyCycleOut_Open request)

Parameters

request Diff_DutyCycleOut_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_DutyCycleOut_Position)

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

Diff_DutyCycleOut_Position Parameters

  • AverageRequestAverage DutyCycleOut request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_DutyCycleOut_Position request)

Parameters

request Diff_DutyCycleOut_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_DutyCycleOut_Velocity)

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

Diff_DutyCycleOut_Velocity Parameters

  • AverageRequestAverage DutyCycleOut request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_DutyCycleOut_Velocity request)

Parameters

request Diff_DutyCycleOut_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicDutyCycle_Open)

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

Diff_MotionMagicDutyCycle_Open Parameters

  • AverageRequestAverage MotionMagicDutyCycle request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicDutyCycle_Open request)

Parameters

request Diff_MotionMagicDutyCycle_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicDutyCycle_Position)

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

Diff_MotionMagicDutyCycle_Position Parameters

  • AverageRequestAverage MotionMagicDutyCycle request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicDutyCycle_Position request)

Parameters

request Diff_MotionMagicDutyCycle_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicDutyCycle_Velocity)

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

Diff_MotionMagicDutyCycle_Velocity Parameters

  • AverageRequestAverage MotionMagicDutyCycle request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicDutyCycle_Velocity request)

Parameters

request Diff_MotionMagicDutyCycle_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoDutyCycle_Open)

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

Diff_MotionMagicExpoDutyCycle_Open Parameters

  • AverageRequestAverage MotionMagicExpoDutyCycle request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoDutyCycle_Open request)

Parameters

request Diff_MotionMagicExpoDutyCycle_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoDutyCycle_Position)

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

Diff_MotionMagicExpoDutyCycle_Position Parameters

  • AverageRequestAverage MotionMagicExpoDutyCycle request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoDutyCycle_Position request)

Parameters

request Diff_MotionMagicExpoDutyCycle_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoDutyCycle_Velocity)

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

Diff_MotionMagicExpoDutyCycle_Velocity Parameters

  • AverageRequestAverage MotionMagicExpoDutyCycle request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoDutyCycle_Velocity request)

Parameters

request Diff_MotionMagicExpoDutyCycle_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoVoltage_Open)

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

Diff_MotionMagicExpoVoltage_Open Parameters

  • AverageRequestAverage MotionMagicExpoVoltage request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoVoltage_Open request)

Parameters

request Diff_MotionMagicExpoVoltage_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoVoltage_Position)

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

Diff_MotionMagicExpoVoltage_Position Parameters

  • AverageRequestAverage MotionMagicExpoVoltage request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoVoltage_Position request)

Parameters

request Diff_MotionMagicExpoVoltage_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicExpoVoltage_Velocity)

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

Diff_MotionMagicExpoVoltage_Velocity Parameters

  • AverageRequestAverage MotionMagicExpoVoltage request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicExpoVoltage_Velocity request)

Parameters

request Diff_MotionMagicExpoVoltage_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityDutyCycle_Open)

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

Diff_MotionMagicVelocityDutyCycle_Open Parameters

  • AverageRequestAverage MotionMagicVelocityDutyCycle request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityDutyCycle_Open request)

Parameters

request Diff_MotionMagicVelocityDutyCycle_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityDutyCycle_Position)

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

Diff_MotionMagicVelocityDutyCycle_Position Parameters

  • AverageRequestAverage MotionMagicVelocityDutyCycle request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityDutyCycle_Position request)

Parameters

request Diff_MotionMagicVelocityDutyCycle_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityDutyCycle_Velocity)

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

Diff_MotionMagicVelocityDutyCycle_Velocity Parameters

  • AverageRequestAverage MotionMagicVelocityDutyCycle request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityDutyCycle_Velocity request)

Parameters

request Diff_MotionMagicVelocityDutyCycle_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityVoltage_Open)

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

Diff_MotionMagicVelocityVoltage_Open Parameters

  • AverageRequestAverage MotionMagicVelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityVoltage_Open request)

Parameters

request Diff_MotionMagicVelocityVoltage_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityVoltage_Position)

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

Diff_MotionMagicVelocityVoltage_Position Parameters

  • AverageRequestAverage MotionMagicVelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityVoltage_Position request)

Parameters

request Diff_MotionMagicVelocityVoltage_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVelocityVoltage_Velocity)

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

Diff_MotionMagicVelocityVoltage_Velocity Parameters

  • AverageRequestAverage MotionMagicVelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVelocityVoltage_Velocity request)

Parameters

request Diff_MotionMagicVelocityVoltage_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVoltage_Open)

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

Diff_MotionMagicVoltage_Open Parameters

  • AverageRequestAverage MotionMagicVoltage request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVoltage_Open request)

Parameters

request Diff_MotionMagicVoltage_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVoltage_Position)

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

Diff_MotionMagicVoltage_Position Parameters

  • AverageRequestAverage MotionMagicVoltage request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVoltage_Position request)

Parameters

request Diff_MotionMagicVoltage_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_MotionMagicVoltage_Velocity)

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

Diff_MotionMagicVoltage_Velocity Parameters

  • AverageRequestAverage MotionMagicVoltage request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_MotionMagicVoltage_Velocity request)

Parameters

request Diff_MotionMagicVoltage_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionDutyCycle_Open)

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

Diff_PositionDutyCycle_Open Parameters

  • AverageRequestAverage PositionDutyCycle request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_PositionDutyCycle_Open request)

Parameters

request Diff_PositionDutyCycle_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionDutyCycle_Position)

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

Diff_PositionDutyCycle_Position Parameters

  • AverageRequestAverage PositionDutyCycle request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_PositionDutyCycle_Position request)

Parameters

request Diff_PositionDutyCycle_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionDutyCycle_Velocity)

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

Diff_PositionDutyCycle_Velocity Parameters

  • AverageRequestAverage PositionDutyCycle request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_PositionDutyCycle_Velocity request)

Parameters

request Diff_PositionDutyCycle_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionVoltage_Open)

Differential control with position average target and voltage difference target.

Diff_PositionVoltage_Open Parameters

  • AverageRequestAverage PositionVoltage request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_PositionVoltage_Open request)

Parameters

request Diff_PositionVoltage_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionVoltage_Position)

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

Diff_PositionVoltage_Position Parameters

  • AverageRequestAverage PositionVoltage request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_PositionVoltage_Position request)

Parameters

request Diff_PositionVoltage_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_PositionVoltage_Velocity)

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

Diff_PositionVoltage_Velocity Parameters

  • AverageRequestAverage PositionVoltage request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_PositionVoltage_Velocity request)

Parameters

request Diff_PositionVoltage_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityDutyCycle_Open)

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

Diff_VelocityDutyCycle_Open Parameters

  • AverageRequestAverage VelocityDutyCYcle request of the mechanism.
  • DifferentialRequestDifferential DutyCycleOut request of the mechanism.
StatusCode SetControl(Diff_VelocityDutyCycle_Open request)

Parameters

request Diff_VelocityDutyCycle_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityDutyCycle_Position)

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

Diff_VelocityDutyCycle_Position Parameters

  • AverageRequestAverage VelocityDutyCYcle request of the mechanism.
  • DifferentialRequestDifferential PositionDutyCycle request of the mechanism.
StatusCode SetControl(Diff_VelocityDutyCycle_Position request)

Parameters

request Diff_VelocityDutyCycle_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityDutyCycle_Velocity)

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

Diff_VelocityDutyCycle_Velocity Parameters

  • AverageRequestAverage VelocityDutyCycle request of the mechanism.
  • DifferentialRequestDifferential VelocityDutyCycle request of the mechanism.
StatusCode SetControl(Diff_VelocityDutyCycle_Velocity request)

Parameters

request Diff_VelocityDutyCycle_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityVoltage_Open)

Differential control with velocity average target and voltage difference target.

Diff_VelocityVoltage_Open Parameters

  • AverageRequestAverage VelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_VelocityVoltage_Open request)

Parameters

request Diff_VelocityVoltage_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityVoltage_Position)

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

Diff_VelocityVoltage_Position Parameters

  • AverageRequestAverage VelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_VelocityVoltage_Position request)

Parameters

request Diff_VelocityVoltage_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VelocityVoltage_Velocity)

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

Diff_VelocityVoltage_Velocity Parameters

  • AverageRequestAverage VelocityVoltage request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_VelocityVoltage_Velocity request)

Parameters

request Diff_VelocityVoltage_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VoltageOut_Open)

Differential control with voltage average target and voltage difference target.

Diff_VoltageOut_Open Parameters

  • AverageRequestAverage VoltageOut request of the mechanism.
  • DifferentialRequestDifferential VoltageOut request of the mechanism.
StatusCode SetControl(Diff_VoltageOut_Open request)

Parameters

request Diff_VoltageOut_Open

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VoltageOut_Position)

Differential control with voltage average target and position difference target.

Diff_VoltageOut_Position Parameters

  • AverageRequestAverage VoltageOut request of the mechanism.
  • DifferentialRequestDifferential PositionVoltage request of the mechanism.
StatusCode SetControl(Diff_VoltageOut_Position request)

Parameters

request Diff_VoltageOut_Position

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Diff_VoltageOut_Velocity)

Differential control with voltage average target and velocity difference target.

Diff_VoltageOut_Velocity Parameters

  • AverageRequestAverage VoltageOut request of the mechanism.
  • DifferentialRequestDifferential VelocityVoltage request of the mechanism.
StatusCode SetControl(Diff_VoltageOut_Velocity request)

Parameters

request Diff_VoltageOut_Velocity

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(ControlRequest)

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
StatusCode SetControl(ControlRequest request)

Parameters

request ControlRequest

Control object to request of the device

Returns

StatusCode

Status Code of the request, 0 is OK

SetControl(DifferentialDutyCycle)

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

  • AverageOutputProportion of supply voltage to apply on the Average axis in fractional units between -1 and +1.
  • DifferentialPositionDifferential position to drive towards in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialDutyCycle request)

Parameters

request DifferentialDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialFollower)

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

  • LeaderIDDevice ID of the differential leader to follow.
  • MotorAlignmentSet 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.
StatusCode SetControl(DifferentialFollower request)

Parameters

request DifferentialFollower

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicDutyCycle)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicDutyCycle request)

Parameters

request DifferentialMotionMagicDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicExpoDutyCycle)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicExpoDutyCycle request)

Parameters

request DifferentialMotionMagicExpoDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicExpoVoltage)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicExpoVoltage request)

Parameters

request DifferentialMotionMagicExpoVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicVelocityDutyCycle)

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

  • AverageVelocityAverage velocity to drive toward in rotations per second.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicVelocityDutyCycle request)

Parameters

request DifferentialMotionMagicVelocityDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicVelocityVoltage)

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

  • AverageVelocityAverage velocity to drive toward in rotations per second.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicVelocityVoltage request)

Parameters

request DifferentialMotionMagicVelocityVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialMotionMagicVoltage)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialMotionMagicVoltage request)

Parameters

request DifferentialMotionMagicVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialPositionDutyCycle)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialPositionDutyCycle request)

Parameters

request DifferentialPositionDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialPositionVoltage)

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

  • AveragePositionAverage position to drive toward in rotations.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialPositionVoltage request)

Parameters

request DifferentialPositionVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialStrictFollower)

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

  • LeaderIDDevice ID of the differential leader to follow.
StatusCode SetControl(DifferentialStrictFollower request)

Parameters

request DifferentialStrictFollower

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialVelocityDutyCycle)

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

  • AverageVelocityAverage velocity to drive toward in rotations per second.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialVelocityDutyCycle request)

Parameters

request DifferentialVelocityDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialVelocityVoltage)

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

  • AverageVelocityAverage velocity to drive toward in rotations per second.
  • DifferentialPositionDifferential position to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • AverageSlotSelect 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].
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialVelocityVoltage request)

Parameters

request DifferentialVelocityVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DifferentialVoltage)

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

  • AverageOutputVoltage to attempt to drive at on the Average axis.
  • DifferentialPositionDifferential position to drive towards in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • DifferentialSlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DifferentialVoltage request)

Parameters

request DifferentialVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DutyCycleOut)

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

  • OutputProportion of supply voltage to apply in fractional units between -1 and +1
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DutyCycleOut request)

Parameters

request DutyCycleOut

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DynamicMotionMagicDutyCycle)

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

  • PositionPosition to drive toward in rotations.
  • VelocityCruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • AccelerationAcceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation
  • JerkJerk 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DynamicMotionMagicDutyCycle request)

Parameters

request DynamicMotionMagicDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DynamicMotionMagicExpoDutyCycle)

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

  • PositionPosition to drive toward in rotations.
  • kVMechanism 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.
  • kAMechanism 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.
  • VelocityCruise 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DynamicMotionMagicExpoDutyCycle request)

Parameters

request DynamicMotionMagicExpoDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DynamicMotionMagicExpoVoltage)

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

  • PositionPosition to drive toward in rotations.
  • kVMechanism 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.
  • kAMechanism 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.
  • VelocityCruise 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DynamicMotionMagicExpoVoltage request)

Parameters

request DynamicMotionMagicExpoVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(DynamicMotionMagicVoltage)

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

  • PositionPosition to drive toward in rotations.
  • VelocityCruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • AccelerationAcceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • JerkJerk 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(DynamicMotionMagicVoltage request)

Parameters

request DynamicMotionMagicVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(Follower)

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

  • LeaderIDDevice ID of the leader to follow.
  • MotorAlignmentSet 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.
StatusCode SetControl(Follower request)

Parameters

request Follower

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicDutyCycle)

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

  • PositionPosition to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicDutyCycle request)

Parameters

request MotionMagicDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicExpoDutyCycle)

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

  • PositionPosition to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicExpoDutyCycle request)

Parameters

request MotionMagicExpoDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicExpoVoltage)

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

  • PositionPosition to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicExpoVoltage request)

Parameters

request MotionMagicExpoVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicVelocityDutyCycle)

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

  • VelocityTarget velocity to drive toward in rotations per second. This can be changed on-the fly.
  • AccelerationThis 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicVelocityDutyCycle request)

Parameters

request MotionMagicVelocityDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicVelocityVoltage)

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

  • VelocityTarget velocity to drive toward in rotations per second. This can be changed on-the fly.
  • AccelerationThis 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.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicVelocityVoltage request)

Parameters

request MotionMagicVelocityVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(MotionMagicVoltage)

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

  • PositionPosition to drive toward in rotations.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(MotionMagicVoltage request)

Parameters

request MotionMagicVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(NeutralOut)

Request neutral output of actuator. The applied brake type is determined by the NeutralMode configuration.

NeutralOut Parameters

  • UseTimesyncSet 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.
StatusCode SetControl(NeutralOut request)

Parameters

request NeutralOut

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(PositionDutyCycle)

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

  • PositionPosition to drive toward in rotations.
  • VelocityVelocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(PositionDutyCycle request)

Parameters

request PositionDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(PositionVoltage)

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

  • PositionPosition to drive toward in rotations.
  • VelocityVelocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(PositionVoltage request)

Parameters

request PositionVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(StaticBrake)

Applies full neutral-brake by shorting motor leads together.

StaticBrake Parameters

  • UseTimesyncSet 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.
StatusCode SetControl(StaticBrake request)

Parameters

request StaticBrake

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(StrictFollower)

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

  • LeaderIDDevice ID of the leader to follow.
StatusCode SetControl(StrictFollower request)

Parameters

request StrictFollower

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(VelocityDutyCycle)

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

  • VelocityVelocity to drive toward in rotations per second.
  • AccelerationAcceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in fractional units between -1 and +1. This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(VelocityDutyCycle request)

Parameters

request VelocityDutyCycle

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(VelocityVoltage)

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

  • VelocityVelocity to drive toward in rotations per second.
  • AccelerationAcceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • FeedForwardFeedforward to apply in volts This is added to the output of the onboard feedforward terms.
  • SlotSelect 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].
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(VelocityVoltage request)

Parameters

request VelocityVoltage

Control object to request of the device

Returns

StatusCode

Code response of the request

SetControl(VoltageOut)

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

  • OutputVoltage to attempt to drive at
  • EnableFOCSet to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supported devices (see 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.
  • OverrideBrakeDurNeutralSet 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.
  • LimitForwardMotionSet 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.
  • LimitReverseMotionSet 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.
  • IgnoreHardwareLimitsSet 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.
  • IgnoreSoftwareLimitsSet 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.
  • UseTimesyncSet 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.
StatusCode SetControl(VoltageOut request)

Parameters

request VoltageOut

Control object to request of the device

Returns

StatusCode

Code response of the request