CoreTalonFXSetControl Method

Overload List

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

CoastOut Parameters

SetControl(ControlRequest) Control motor 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

SetControl(Diff_DutyCycleOut_PositionDutyCycle) Differential control with duty cycle average target and position difference target.
  • Diff_DutyCycleOut_PositionDutyCycle Parameters
SetControl(Diff_DutyCycleOut_VelocityDutyCycle) Differential control with duty cycle average target and velocity difference target.
  • Diff_DutyCycleOut_VelocityDutyCycle Parameters
SetControl(Diff_MotionMagicDutyCycle_PositionDutyCycle) Differential control with Motion Magic® average target and position difference target using dutycycle control.
  • Diff_MotionMagicDutyCycle_PositionDutyCycle Parameters
SetControl(Diff_MotionMagicDutyCycle_VelocityDutyCycle) Differential control with Motion Magic® average target and velocity difference target using dutycycle control.
  • Diff_MotionMagicDutyCycle_VelocityDutyCycle Parameters
SetControl(Diff_MotionMagicTorqueCurrentFOC_PositionTorqueCurrentFOC) Differential control with Motion Magic® average target and position difference target using torque current control.
  • Diff_MotionMagicTorqueCurrentFOC_PositionTorqueCurrentFOC Parameters
SetControl(Diff_MotionMagicTorqueCurrentFOC_VelocityTorqueCurrentFOC) Differential control with Motion Magic® average target and velocity difference target using torque current control.
  • Diff_MotionMagicTorqueCurrentFOC_VelocityTorqueCurrentFOC Parameters
SetControl(Diff_MotionMagicVoltage_PositionVoltage) Differential control with Motion Magic® average target and position difference target using voltage control.
  • Diff_MotionMagicVoltage_PositionVoltage Parameters
SetControl(Diff_MotionMagicVoltage_VelocityVoltage) Differential control with Motion Magic® average target and velocity difference target using voltage control.
  • Diff_MotionMagicVoltage_VelocityVoltage Parameters
SetControl(Diff_PositionDutyCycle_PositionDutyCycle) Differential control with position average target and position difference target using dutycycle control.
  • Diff_PositionDutyCycle_PositionDutyCycle Parameters
SetControl(Diff_PositionDutyCycle_VelocityDutyCycle) Differential control with position average target and velocity difference target using dutycycle control.
  • Diff_PositionDutyCycle_VelocityDutyCycle Parameters
SetControl(Diff_PositionTorqueCurrentFOC_PositionTorqueCurrentFOC) Differential control with position average target and position difference target using torque current control.
  • Diff_PositionTorqueCurrentFOC_PositionTorqueCurrentFOC Parameters
SetControl(Diff_PositionTorqueCurrentFOC_VelocityTorqueCurrentFOC) Differential control with position average target and velocity difference target using torque current control.
  • Diff_PositionTorqueCurrentFOC_VelocityTorqueCurrentFOC Parameters
SetControl(Diff_PositionVoltage_PositionVoltage) Differential control with position average target and position difference target using voltage control.
  • Diff_PositionVoltage_PositionVoltage Parameters
SetControl(Diff_PositionVoltage_VelocityVoltage) Differential control with position average target and velocity difference target using voltage control.
  • Diff_PositionVoltage_VelocityVoltage Parameters
SetControl(Diff_TorqueCurrentFOC_PositionTorqueCurrentFOC) Differential control with torque current average target and position difference target.
  • Diff_TorqueCurrentFOC_PositionTorqueCurrentFOC Parameters
SetControl(Diff_TorqueCurrentFOC_VelocityTorqueCurrentFOC) Differential control with torque current average target and velocity difference target.
  • Diff_TorqueCurrentFOC_VelocityTorqueCurrentFOC Parameters
SetControl(Diff_VelocityDutyCycle_PositionDutyCycle) Differential control with velocity average target and position difference target using dutycycle control.
  • Diff_VelocityDutyCycle_PositionDutyCycle Parameters
SetControl(Diff_VelocityDutyCycle_VelocityDutyCycle) Differential control with velocity average target and velocity difference target using dutycycle control.
  • Diff_VelocityDutyCycle_VelocityDutyCycle Parameters
SetControl(Diff_VelocityTorqueCurrentFOC_PositionTorqueCurrentFOC) Differential control with velocity average target and position difference target using torque current control.
  • Diff_VelocityTorqueCurrentFOC_PositionTorqueCurrentFOC Parameters
SetControl(Diff_VelocityTorqueCurrentFOC_VelocityTorqueCurrentFOC) Differential control with velocity average target and velocity difference target using torque current control.
  • Diff_VelocityTorqueCurrentFOC_VelocityTorqueCurrentFOC Parameters
SetControl(Diff_VelocityVoltage_PositionVoltage) Differential control with velocity average target and position difference target using voltage control.
  • Diff_VelocityVoltage_PositionVoltage Parameters
SetControl(Diff_VelocityVoltage_VelocityVoltage) Differential control with velocity average target and velocity difference target using voltage control.
  • Diff_VelocityVoltage_VelocityVoltage Parameters
SetControl(Diff_VoltageOut_PositionVoltage) Differential control with voltage average target and position difference target.
  • Diff_VoltageOut_PositionVoltage Parameters
SetControl(Diff_VoltageOut_VelocityVoltage) Differential control with voltage average target and velocity difference target.
  • Diff_VoltageOut_VelocityVoltage Parameters
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

  • TargetOutput – Proportion of supply voltage to apply in fractional units between -1 and +1
  • DifferentialPosition – Differential position to drive towards in rotations
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(DifferentialFollower) Follow the differential 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 percent supply output control, the duty cycle is matched. Motor direction either matches master's configured direction or opposes it based on OpposeMasterDirection.

DifferentialFollower Parameters

  • MasterID – Device ID of the differential master to follow.
  • OpposeMasterDirection – Set to false for motor invert to match the master's configured Invert - which is typical when master and follower are mechanically linked and spin in the same direction. Set to true for motor invert to oppose the master's configured Invert - this is typical where the the master and follower mechanically spin in opposite directions.
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 Jerk value specified via the Motion Magic® configuration values. 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

  • TargetPosition – Average position to drive toward in rotations.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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 Jerk value specified via the Motion Magic® configuration values. 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

  • TargetPosition – Average position to drive toward in rotations.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • TargetPosition – Average position to drive toward in rotations.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • TargetPosition – Average position to drive toward in rotations.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(DifferentialStrictFollower) Follow the differential motor output of another Talon while ignoring the master's invert setting.

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

DifferentialStrictFollower Parameters

  • MasterID – Device ID of the differential master to follow.
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

  • TargetVelocity – Average velocity to drive toward in rotations per second.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • TargetVelocity – Average velocity to drive toward in rotations per second.
  • DifferentialPosition – Differential position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. 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.
  • TargetSlot – Select which gains are applied to the primary controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • TargetOutput – Voltage to attempt to drive at
  • DifferentialPosition – Differential position to drive towards in rotations
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • DifferentialSlot – Select which gains are applied to the differential controller by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • Output – Proportion of supply voltage to apply in fractional units between -1 and +1
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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 Jerk. Users can optionally provide a duty cycle feedforward. This control requires use of a CANivore.

Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise Velocity, Acceleration, and Jerk value. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

DynamicMotionMagicDutyCycle Parameters

  • Position – Position to drive toward in rotations.
  • Velocity – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • Acceleration – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation
  • Jerk – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in fractional units between -1 and +1.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(DynamicMotionMagicTorqueCurrentFOC) Requests Motion Magic® to target a final position using a motion profile. This dynamic request allows runtime changes to Cruise Velocity, Acceleration, and Jerk. Users can optionally provide a torque current feedforward. This control requires use of a CANivore.

Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise Velocity, Acceleration, and Jerk value. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.

DynamicMotionMagicTorqueCurrentFOC Parameters

  • Position – Position to drive toward in rotations.
  • Velocity – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • Acceleration – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • Jerk – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • FeedForward – Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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 Jerk. Users can optionally provide a voltage feedforward. This control requires use of a CANivore.

Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise Velocity, Acceleration, and Jerk value. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

DynamicMotionMagicVoltage Parameters

  • Position – Position to drive toward in rotations.
  • Velocity – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • Acceleration – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • Jerk – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in volts
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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 percent supply output control, the duty cycle is matched. Motor direction either matches master's configured direction or opposes it based on OpposeMasterDirection.

Follower Parameters

  • MasterID – Device ID of the master to follow.
  • OpposeMasterDirection – Set to false for motor invert to match the master's configured Invert - which is typical when master and follower are mechanically linked and spin in the same direction. Set to true for motor invert to oppose the master's configured Invert - this is typical where the the master and follower mechanically spin in opposite directions.
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 Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

MotionMagicDutyCycle Parameters

  • Position – Position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in fractional units between -1 and +1.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(MotionMagicTorqueCurrentFOC) Requests Motion Magic® to target a final position using a motion profile. Users can optionally provide a torque current feedforward.

Motion Magic® produces a motion profile in real-time while attempting to honor the Cruise Velocity, Acceleration, and Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.

MotionMagicTorqueCurrentFOC Parameters

  • Position – Position to drive toward in rotations.
  • FeedForward – Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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 Jerk value. If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile. Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.

MotionMagicVelocityDutyCycle Parameters

  • Velocity – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
  • Acceleration – This is the absolute Acceleration to use generating the profile. If this parameter is zero, the Acceleration persistent configuration parameter is used instead. Acceleration is in rotations per second squared. If nonzero, the signage does not matter as the absolute value is used.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in fractional units between -1 and +1.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(MotionMagicVelocityTorqueCurrentFOC) 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 torque feedforward.

Motion Magic® Velocity produces a motion profile in real-time while attempting to honor the specified Acceleration and Jerk value. 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 based on torque current, so relevant closed-loop gains will use Amperes for the numerator.

MotionMagicVelocityTorqueCurrentFOC Parameters

  • Velocity – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
  • Acceleration – This is the absolute Acceleration to use generating the profile. If this parameter is zero, the Acceleration persistent configuration parameter is used instead. Acceleration is in rotations per second squared. If nonzero, the signage does not matter as the absolute value is used.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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 Jerk value. If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile. Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

MotionMagicVelocityVoltage Parameters

  • Velocity – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
  • Acceleration – This is the absolute Acceleration to use generating the profile. If this parameter is zero, the Acceleration persistent configuration parameter is used instead. Acceleration is in rotations per second squared. If nonzero, the signage does not matter as the absolute value is used.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in volts
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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 Jerk value specified via the Motion Magic® configuration values. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.

MotionMagicVoltage Parameters

  • Position – Position to drive toward in rotations.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in volts
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(MusicTone) Plays a single tone at the user specified frequency.

MusicTone Parameters

  • AudioFrequency – Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-10000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 10Khz will be capped to 10KHz.
SetControl(NeutralOut) Request neutral output of actuator. The applied brake type is determined by the NeutralMode configuration.

NeutralOut Parameters

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

  • Position – Position to drive toward in rotations.
  • Velocity – Velocity to drive toward in rotations per second.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in fractional units between -1 and +1.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(PositionTorqueCurrentFOC) Request PID to target position with torque current 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 torque current as an arbitrary feedforward value.

PositionTorqueCurrentFOC Parameters

  • Position – Position to drive toward in rotations.
  • Velocity – Velocity to drive toward in rotations per second.
  • FeedForward – Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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

  • Position – Position to drive toward in rotations.
  • Velocity – Velocity to drive toward in rotations per second.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in volts
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(StaticBrake) Applies full neutral-brake by shorting motor leads together.

StaticBrake Parameters

SetControl(StrictFollower) Follow the motor output of another Talon while ignoring the master's invert setting.

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

StrictFollower Parameters

  • MasterID – Device ID of the master to follow.
SetControl(TorqueCurrentFOC) Request a specified motor current (field oriented control).

This control request will drive the motor to the requested motor (stator) current value. This leverages field oriented control (FOC), which means greater peak power than what is documented. This scales to torque based on Motor's kT constant.

TorqueCurrentFOC Parameters

  • Output – Amount of motor current in Amperes
  • MaxAbsDutyCycle – The maximum absolute motor output that can be applied, which effectively limits the velocity. For example, 0.50 means no more than 50% output in either direction. This is useful for preventing the motor from spinning to its terminal velocity when there is no external torque applied unto the rotor. Note this is absolute maximum, so the value should be between zero and one.
  • Deadband – Deadband in Amperes. If torque request is within deadband, the bridge output is neutral. If deadband is set to zero then there is effectively no deadband. Note if deadband is zero, a free spinning motor will spin for quite a while as the firmware attempts to hold the motor's bemf. If user expects motor to cease spinning quickly with a demand of zero, we recommend a deadband of one Ampere. This value will be converted to an integral value of amps.
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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

  • Velocity – Velocity to drive toward in rotations per second.
  • Acceleration – Acceleration to drive toward in rotations per second squared.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in fractional units between -1 and +1.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
SetControl(VelocityTorqueCurrentFOC) Request PID to target velocity with torque current 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 torque current as an arbitrary feedforward value.

VelocityTorqueCurrentFOC Parameters

  • Velocity – Velocity to drive toward in rotations per second.
  • Acceleration – Acceleration to drive toward in rotations per second squared.
  • FeedForward – Feedforward to apply in torque current in Amperes. User can use motor's kT to scale Newton-meter to Amperes.
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideCoastDurNeutral – Set to true to coast 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 0A (zero torque).
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

  • Velocity – Velocity to drive toward in rotations per second.
  • Acceleration – Acceleration to drive toward in rotations per second squared.
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • FeedForward – Feedforward to apply in volts
  • Slot – Select which gains are applied by selecting the slot. Use the configuration api to set the gain values for the selected slot before enabling this feature. Slot must be within [0,2].
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.
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

  • Output – Voltage to attempt to drive at
  • EnableFOC – Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15%. Set to false to use trapezoidal commutation. FOC improves motor performance by leveraging torque (current) control. However, this may be inconvenient for applications that require specifying duty cycle or voltage. CTR-Electronics has developed a hybrid method that combines the performances gains of FOC while still allowing applications to provide duty cycle or voltage demand. This not to be confused with simple sinusoidal control or phase voltage control which lacks the performance gains.
  • OverrideBrakeDurNeutral – Set to true to static-brake the rotor when output is zero (or within deadband). Set to false to use the NeutralMode configuration setting (default). This flag exists to provide the fundamental behavior of this control when output is zero, which is to provide 0V to the motor.

See Also