CoreTalonFX Class

Class description for the Talon FX integrated motor controller that runs on associated Falcon motors.

Definition

Namespace: CTRE.Phoenix6.Hardware.Core
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public class CoreTalonFX : ParentDevice
Inheritance
Object    ParentDevice    CoreTalonFX

Constructors

CoreTalonFX Constructs a new Talon FX motor controller object.

Properties

Configurator The configurator for this device. Users may use this to refresh and apply configs, such as the TalonFXConfiguration object
ControlRequest The last applied control request. Caller can cast this to the derived class if they know what type it is, otherwise they can use the ControlInfo to get info out of it.
(Inherited from ParentDevice)
DeviceHash Hash of this device
(Inherited from ParentDevice)
DeviceID ID of this device
(Inherited from ParentDevice)
HasResetOccurred Returns true if device has reset since the previous call of this routine.
Network Network this device is on
(Inherited from ParentDevice)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAcceleration Acceleration of the device in mechanism rotations.
  • Minimum Value – -128.0
  • Maximum Value – 127.96875
  • Default Value – 0
  • Units – rotations per second²
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetAppliedRotorPolarity The applied rotor polarity. This typically is determined by the Inverted config, but can be overridden if using Follower features. Default Rates:
  • CAN – 100.0 Hz
GetBridgeOutput The applied output of the bridge. Default Rates:
  • CAN – 100.0 Hz
GetClosedLoopSlot Closed loop slot in use

This is the slot that the closed loop PID is using.

  • Minimum Value – 0
  • Maximum Value – 2
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetControlMode The active control mode of the motor controller Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDeviceEnable Indicates if device is actuator enabled. Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDeviceTemp Temperature of device

This is the temperature that the device measures itself to be at. Similar to Processor Temperature.

  • Minimum Value – 0.0
  • Maximum Value – 255.0
  • Default Value – 0
  • Units – ℃
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDifferentialAveragePosition Average component of the differential position of device.
  • Minimum Value – -16384.0
  • Maximum Value – 16383.999755859375
  • Default Value – 0
  • Units – rotations
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDifferentialAverageVelocity Average component of the differential velocity of device.
  • Minimum Value – -512.0
  • Maximum Value – 511.998046875
  • Default Value – 0
  • Units – rotations per second
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDifferentialClosedLoopSlot Differential Closed loop slot in use

This is the slot that the closed loop differential PID is using.

  • Minimum Value – 0
  • Maximum Value – 2
  • Default Value – 0
  • Units
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDifferentialControlMode The active control mode of the differential controller Default Rates:
  • CAN – 100.0 Hz
GetDifferentialDifferencePosition Difference component of the differential position of device.
  • Minimum Value – -16384.0
  • Maximum Value – 16383.999755859375
  • Default Value – 0
  • Units – rotations
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDifferentialDifferenceVelocity Difference component of the differential velocity of device.
  • Minimum Value – -512.0
  • Maximum Value – 511.998046875
  • Default Value – 0
  • Units – rotations per second
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetDutyCycle The applied motor duty cycle.
  • Minimum Value – -2.0
  • Maximum Value – 1.9990234375
  • Default Value – 0
  • Units – fractional
Default Rates:
  • CAN – 100.0 Hz
GetFault_BootDuringEnable Device boot while detecting the enable signal
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_BridgeBrownout Bridge was disabled most likely due to supply voltage dropping too low.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_DeviceTemp Device temperature exceeded limit
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_ForwardHardLimit Forward limit switch has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_ForwardSoftLimit Forward soft limit has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_FusedSensorOutOfSync The remote sensor used for fusion has fallen out of sync to the local sensor. A re-synchronization has occurred, which may cause a discontinuity. This typically happens if there is significant slop in the mechanism, or if the RotorToSensorRatio configuration parameter is incorrect.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_Hardware Hardware fault occurred
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_MissingDifferentialFX The remote Talon FX used for differential control is not present on CAN Bus.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_OverSupplyV Supply Voltage has exceeded the maximum voltage rating of device.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_ProcTemp Processor temperature exceeded limit
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_RemoteSensorDataInvalid The remote sensor's data is no longer trusted. This can happen if the remote sensor disappears from the CAN bus or if the remote sensor indicates its data is no longer valid, such as when a CANcoder's magnet strength falls into the "red" range.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_RemoteSensorPosOverflow The remote sensor position has overflowed. Because of the nature of remote sensors, it is possible for the remote sensor position to overflow beyond what is supported by the status signal frame. However, this is rare and cannot occur over the course of an FRC match under normal use.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_RemoteSensorReset The remote sensor has reset.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_ReverseHardLimit Reverse limit switch has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_ReverseSoftLimit Reverse soft limit has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_StatorCurrLimit Stator current limit occured.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_SupplyCurrLimit Supply current limit occured.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_Undervoltage Device supply voltage dropped to near brownout levels
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_UnlicensedFeatureInUse An unlicensed feature is in use, device may not behave as expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_UnstableSupplyV Supply Voltage is unstable. Ensure you are using a battery and current limited power supply.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFault_UsingFusedCANcoderWhileUnlicensed Using Fused CANcoder feature while unlicensed. Device has fallen back to remote CANcoder.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetFaultField Integer representing all faults

This returns the fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.

  • Minimum Value – 0
  • Maximum Value – 16777215
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetForwardLimit Forward Limit Pin. Default Rates:
  • CAN – 100.0 Hz
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetMotionMagicIsRunning Check if Motion Magic® is running. This is equivalent to checking that the reported control mode is a Motion Magic® based mode. Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetPosition Position of the device in mechanism rotations. This can be the position of a remote sensor and is affected by the RotorToSensorRatio and SensorToMechanismRatio configs.
  • Minimum Value – -16384.0
  • Maximum Value – 16383.999755859375
  • Default Value – 0
  • Units – rotations
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetProcessorTemp Temperature of the processor

This is the temperature that the processor measures itself to be at. Similar to Device Temperature.

  • Minimum Value – 0.0
  • Maximum Value – 255.0
  • Default Value – 0
  • Units – ℃
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetResetOccurredChecker Return a lambda that checks for device resets
GetReverseLimit Reverse Limit Pin. Default Rates:
  • CAN – 100.0 Hz
GetRotorPosition Position of the motor rotor. This position is only affected by the RotorOffset config.
  • Minimum Value – -16384.0
  • Maximum Value – 16383.999755859375
  • Default Value – 0
  • Units – rotations
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetRotorVelocity Velocity of the motor rotor. This velocity is not affected by any feedback configs.
  • Minimum Value – -512.0
  • Maximum Value – 511.998046875
  • Default Value – 0
  • Units – rotations per second
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetStatorCurrent Current corresponding to the stator windings. Similar to TorqueCurrent. Users will likely prefer TorqueCurrent over StatorCurrent.

Stator current where Positive current indicates motoring regardless of direction. Negative current indicates regenerative braking regardless of direction.

  • Minimum Value – -327.68
  • Maximum Value – 327.66
  • Default Value – 0
  • Units – A
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetStickyFault_BootDuringEnable Device boot while detecting the enable signal
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_BridgeBrownout Bridge was disabled most likely due to supply voltage dropping too low.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_DeviceTemp Device temperature exceeded limit
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_ForwardHardLimit Forward limit switch has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_ForwardSoftLimit Forward soft limit has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_FusedSensorOutOfSync The remote sensor used for fusion has fallen out of sync to the local sensor. A re-synchronization has occurred, which may cause a discontinuity. This typically happens if there is significant slop in the mechanism, or if the RotorToSensorRatio configuration parameter is incorrect.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_Hardware Hardware fault occurred
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_MissingDifferentialFX The remote Talon FX used for differential control is not present on CAN Bus.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_OverSupplyV Supply Voltage has exceeded the maximum voltage rating of device.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_ProcTemp Processor temperature exceeded limit
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_RemoteSensorDataInvalid The remote sensor's data is no longer trusted. This can happen if the remote sensor disappears from the CAN bus or if the remote sensor indicates its data is no longer valid, such as when a CANcoder's magnet strength falls into the "red" range.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_RemoteSensorPosOverflow The remote sensor position has overflowed. Because of the nature of remote sensors, it is possible for the remote sensor position to overflow beyond what is supported by the status signal frame. However, this is rare and cannot occur over the course of an FRC match under normal use.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_RemoteSensorReset The remote sensor has reset.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_ReverseHardLimit Reverse limit switch has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_ReverseSoftLimit Reverse soft limit has been asserted. Output is set to neutral.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_StatorCurrLimit Stator current limit occured.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_SupplyCurrLimit Supply current limit occured.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_Undervoltage Device supply voltage dropped to near brownout levels
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_UnlicensedFeatureInUse An unlicensed feature is in use, device may not behave as expected.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_UnstableSupplyV Supply Voltage is unstable. Ensure you are using a battery and current limited power supply.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFault_UsingFusedCANcoderWhileUnlicensed Using Fused CANcoder feature while unlicensed. Device has fallen back to remote CANcoder.
  • Default Value – False
Default Rates:
  • CAN – 4.0 Hz
GetStickyFaultField Integer representing all sticky faults

This returns the persistent "sticky" fault flags reported by the device. These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.

  • Minimum Value – 0
  • Maximum Value – 16777215
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetSupplyCurrent Measured supply side current
  • Minimum Value – -327.68
  • Maximum Value – 327.66
  • Default Value – 0
  • Units – A
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetSupplyVoltage Measured supply voltage to the TalonFX.
  • Minimum Value – 4
  • Maximum Value – 29.575
  • Default Value – 4
  • Units – V
Default Rates:
  • CAN 2.0 – 4.0 Hz
  • CAN FD – 100.0 Hz
GetTorqueCurrent Current corresponding to the torque output by the motor. Similar to StatorCurrent. Users will likely prefer this current to calculate the applied torque to the rotor.

Stator current where positive current means torque is applied in the forward direction as determined by the Inverted setting

  • Minimum Value – -327.68
  • Maximum Value – 327.67
  • Default Value – 0
  • Units – A
Default Rates:
  • CAN – 100.0 Hz
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVelocity Velocity of the device in mechanism rotations per second. This can be the velocity of a remote sensor and is affected by the RotorToSensorRatio and SensorToMechanismRatio configs.
  • Minimum Value – -512.0
  • Maximum Value – 511.998046875
  • Default Value – 0
  • Units – rotations per second
Default Rates:
  • CAN 2.0 – 50.0 Hz
  • CAN FD – 100.0 Hz
GetVersion Full Version. The format is a four byte value.

Full Version of firmware in device. The format is a four byte value.

  • Minimum Value – 0
  • Maximum Value – 4294967295
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionBugfix App Bugfix Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionBuild App Build Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionMajor App Major Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
GetVersionMinor App Minor Version number.
  • Minimum Value – 0
  • Maximum Value – 255
  • Default Value – 0
  • Units
Default Rates:
  • CAN – 4.0 Hz
LookupStatusSignalT(UInt16, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
(Inherited from ParentDevice)
LookupStatusSignalT(UInt16, Int32, FuncDictionaryInt32, StatusSignalT, String, Boolean) Looks up a status signal and inserts it into the local dictionary if not found
(Inherited from ParentDevice)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OptimizeBusUtilization Optimizes the device's bus utilization by reducing the update frequencies of its status signals.

All status signals that have not been explicitly given an update frequency will be disabled. Note that if other status signals in the same status frame have been given an update frequency, the update frequency will be honored for the entire frame.

This function only needs to be called once on this device in the robot program. Additionally, this method does not necessarily need to be called after setting the update frequencies of other signals.

To restore the default status update frequencies, remove this method call, redeploy the robot application, and power-cycle the devices on the bus. Alternatively, the user can override individual status update frequencies using {@link BaseStatusSignal#setUpdateFrequency}.
(Inherited from ParentDevice)

ReportIfTooOld Function to call to check if the device is too old, and if so report it to the console output
(Overrides ParentDeviceReportIfTooOld)
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.
SetControlPrivate Sets the control request to this device
(Inherited from ParentDevice)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

deviceIdentifier The unique deviceIdentifier for this device
(Inherited from ParentDevice)

See Also