phoenix6.controls
#
Submodules#
phoenix6.controls.coast_out
phoenix6.controls.differential_duty_cycle
phoenix6.controls.differential_follower
phoenix6.controls.differential_motion_magic_duty_cycle
phoenix6.controls.differential_motion_magic_voltage
phoenix6.controls.differential_position_duty_cycle
phoenix6.controls.differential_position_voltage
phoenix6.controls.differential_strict_follower
phoenix6.controls.differential_velocity_duty_cycle
phoenix6.controls.differential_velocity_voltage
phoenix6.controls.differential_voltage
phoenix6.controls.duty_cycle_out
phoenix6.controls.dynamic_motion_magic_duty_cycle
phoenix6.controls.dynamic_motion_magic_torque_current_foc
phoenix6.controls.dynamic_motion_magic_voltage
phoenix6.controls.empty_control
phoenix6.controls.follower
phoenix6.controls.motion_magic_duty_cycle
phoenix6.controls.motion_magic_expo_duty_cycle
phoenix6.controls.motion_magic_expo_torque_current_foc
phoenix6.controls.motion_magic_expo_voltage
phoenix6.controls.motion_magic_torque_current_foc
phoenix6.controls.motion_magic_velocity_duty_cycle
phoenix6.controls.motion_magic_velocity_torque_current_foc
phoenix6.controls.motion_magic_velocity_voltage
phoenix6.controls.motion_magic_voltage
phoenix6.controls.music_tone
phoenix6.controls.neutral_out
phoenix6.controls.position_duty_cycle
phoenix6.controls.position_torque_current_foc
phoenix6.controls.position_voltage
phoenix6.controls.static_brake
phoenix6.controls.strict_follower
phoenix6.controls.torque_current_foc
phoenix6.controls.velocity_duty_cycle
phoenix6.controls.velocity_torque_current_foc
phoenix6.controls.velocity_voltage
phoenix6.controls.voltage_out
Package Contents#
- class phoenix6.controls.DutyCycleOut(output: float, enable_foc: bool = True, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Request a specified motor duty cycle.
This control mode will output a proportion of the supplied voltage which is supplied by the user.
- Parameters:
output (float) – Proportion of supply voltage to apply in fractional units between -1 and +1
enable_foc (bool) –
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.
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- output#
Proportion of supply voltage to apply in fractional units between -1 and +1
- enable_foc#
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.
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_output(new_output: float) DutyCycleOut #
Modifies this Control Request’s output parameter and returns itself for method-chaining and easier to use request API.
Proportion of supply voltage to apply in fractional units between -1 and +1
- Parameters:
new_output (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DutyCycleOut #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DutyCycleOut #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DutyCycleOut #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DutyCycleOut #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DutyCycleOut #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.TorqueCurrentFOC(output: phoenix6.units.ampere, max_abs_duty_cycle: float = 1.0, deadband: phoenix6.units.ampere = 0.0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro; 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.
- Parameters:
output (ampere) – Amount of motor current in Amperes
max_abs_duty_cycle (float) – 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 (ampere) – 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.
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- output#
Amount of motor current in Amperes
- max_abs_duty_cycle#
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.
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_output(new_output: phoenix6.units.ampere) TorqueCurrentFOC #
Modifies this Control Request’s output parameter and returns itself for method-chaining and easier to use request API.
Amount of motor current in Amperes
- Parameters:
new_output (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_max_abs_duty_cycle(new_max_abs_duty_cycle: float) TorqueCurrentFOC #
Modifies this Control Request’s max_abs_duty_cycle parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_max_abs_duty_cycle (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_deadband(new_deadband: phoenix6.units.ampere) TorqueCurrentFOC #
Modifies this Control Request’s deadband parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_deadband (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) TorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) TorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) TorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) TorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.VoltageOut(output: phoenix6.units.volt, enable_foc: bool = True, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
output (volt) – Voltage to attempt to drive at
enable_foc (bool) –
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.
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- output#
Voltage to attempt to drive at
- enable_foc#
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.
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_output(new_output: phoenix6.units.volt) VoltageOut #
Modifies this Control Request’s output parameter and returns itself for method-chaining and easier to use request API.
Voltage to attempt to drive at
- Parameters:
new_output (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) VoltageOut #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) VoltageOut #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) VoltageOut #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) VoltageOut #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) VoltageOut #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.PositionDutyCycle(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second = 0.0, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- velocity#
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) PositionDutyCycle #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) PositionDutyCycle #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) PositionDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) PositionDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) PositionDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) PositionDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) PositionDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) PositionDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) PositionDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.PositionVoltage(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second = 0.0, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- velocity#
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) PositionVoltage #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) PositionVoltage #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) PositionVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) PositionVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) PositionVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) PositionVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) PositionVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) PositionVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) PositionVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.PositionTorqueCurrentFOC(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second = 0.0, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro; 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.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- velocity#
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) PositionTorqueCurrentFOC #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) PositionTorqueCurrentFOC #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) PositionTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) PositionTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) PositionTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) PositionTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) PositionTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) PositionTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.VelocityDutyCycle(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
velocity (rotations_per_second) – Velocity to drive toward in rotations per second.
acceleration (rotations_per_second_squared) – Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- velocity#
Velocity to drive toward in rotations per second.
- acceleration#
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) VelocityDutyCycle #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) VelocityDutyCycle #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) VelocityDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) VelocityDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) VelocityDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) VelocityDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) VelocityDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) VelocityDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) VelocityDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.VelocityVoltage(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
velocity (rotations_per_second) – Velocity to drive toward in rotations per second.
acceleration (rotations_per_second_squared) – Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- velocity#
Velocity to drive toward in rotations per second.
- acceleration#
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) VelocityVoltage #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) VelocityVoltage #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) VelocityVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) VelocityVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) VelocityVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) VelocityVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) VelocityVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) VelocityVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) VelocityVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.VelocityTorqueCurrentFOC(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro; 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.
- Parameters:
velocity (rotations_per_second) – Velocity to drive toward in rotations per second.
acceleration (rotations_per_second_squared) – Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- velocity#
Velocity to drive toward in rotations per second.
- acceleration#
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) VelocityTorqueCurrentFOC #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Velocity to drive toward in rotations per second.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) VelocityTorqueCurrentFOC #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration to drive toward in rotations per second squared. This is typically used for motion profiles generated by the robot program.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) VelocityTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) VelocityTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) VelocityTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) VelocityTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) VelocityTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) VelocityTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicDutyCycle(position: phoenix6.units.rotation, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.
- Parameters:
position (rotation) – Position to drive toward in rotations.
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicDutyCycle #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) MotionMagicDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicVoltage(position: phoenix6.units.rotation, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicVoltage #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) MotionMagicVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicTorqueCurrentFOC(position: phoenix6.units.rotation, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro; 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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialDutyCycle(target_output: float, differential_position: phoenix6.units.rotation, enable_foc: bool = True, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_output (float) – Proportion of supply voltage to apply in fractional units between -1 and +1
differential_position (rotation) – Differential position to drive towards in rotations
enable_foc (bool) –
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.
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_output#
Proportion of supply voltage to apply in fractional units between -1 and +1
- differential_position#
Differential position to drive towards in rotations
- enable_foc#
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.
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_output(new_target_output: float) DifferentialDutyCycle #
Modifies this Control Request’s target_output parameter and returns itself for method-chaining and easier to use request API.
Proportion of supply voltage to apply in fractional units between -1 and +1
- Parameters:
new_target_output (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialDutyCycle #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive towards in rotations
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialDutyCycle #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialVoltage(target_output: phoenix6.units.volt, differential_position: phoenix6.units.rotation, enable_foc: bool = True, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_output (volt) – Voltage to attempt to drive at
differential_position (rotation) – Differential position to drive towards in rotations
enable_foc (bool) –
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.
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_output#
Voltage to attempt to drive at
- differential_position#
Differential position to drive towards in rotations
- enable_foc#
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.
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_output(new_target_output: phoenix6.units.volt) DifferentialVoltage #
Modifies this Control Request’s target_output parameter and returns itself for method-chaining and easier to use request API.
Voltage to attempt to drive at
- Parameters:
new_target_output (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialVoltage #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive towards in rotations
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialVoltage #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialPositionDutyCycle(target_position: phoenix6.units.rotation, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_position (rotation) – Average position to drive toward in rotations.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_position#
Average position to drive toward in rotations.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_position(new_target_position: phoenix6.units.rotation) DifferentialPositionDutyCycle #
Modifies this Control Request’s target_position parameter and returns itself for method-chaining and easier to use request API.
Average position to drive toward in rotations.
- Parameters:
new_target_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialPositionDutyCycle #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialPositionDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialPositionDutyCycle #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialPositionDutyCycle #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialPositionDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialPositionDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialPositionDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialPositionDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialPositionVoltage(target_position: phoenix6.units.rotation, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_position (rotation) – Average position to drive toward in rotations.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_position#
Average position to drive toward in rotations.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_position(new_target_position: phoenix6.units.rotation) DifferentialPositionVoltage #
Modifies this Control Request’s target_position parameter and returns itself for method-chaining and easier to use request API.
Average position to drive toward in rotations.
- Parameters:
new_target_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialPositionVoltage #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialPositionVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialPositionVoltage #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialPositionVoltage #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialPositionVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialPositionVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialPositionVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialPositionVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialVelocityDutyCycle(target_velocity: phoenix6.units.rotations_per_second, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_velocity (rotations_per_second) – Average velocity to drive toward in rotations per second.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_velocity#
Average velocity to drive toward in rotations per second.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_velocity(new_target_velocity: phoenix6.units.rotations_per_second) DifferentialVelocityDutyCycle #
Modifies this Control Request’s target_velocity parameter and returns itself for method-chaining and easier to use request API.
Average velocity to drive toward in rotations per second.
- Parameters:
new_target_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialVelocityDutyCycle #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialVelocityDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialVelocityDutyCycle #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialVelocityDutyCycle #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialVelocityDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialVelocityDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialVelocityDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialVelocityDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialVelocityVoltage(target_velocity: phoenix6.units.rotations_per_second, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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.
- Parameters:
target_velocity (rotations_per_second) – Average velocity to drive toward in rotations per second.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_velocity#
Average velocity to drive toward in rotations per second.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_velocity(new_target_velocity: phoenix6.units.rotations_per_second) DifferentialVelocityVoltage #
Modifies this Control Request’s target_velocity parameter and returns itself for method-chaining and easier to use request API.
Average velocity to drive toward in rotations per second.
- Parameters:
new_target_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialVelocityVoltage #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialVelocityVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialVelocityVoltage #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialVelocityVoltage #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialVelocityVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialVelocityVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialVelocityVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialVelocityVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialMotionMagicDutyCycle(target_position: phoenix6.units.rotation, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.
- Parameters:
target_position (rotation) – Average position to drive toward in rotations.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_position#
Average position to drive toward in rotations.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_position(new_target_position: phoenix6.units.rotation) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s target_position parameter and returns itself for method-chaining and easier to use request API.
Average position to drive toward in rotations.
- Parameters:
new_target_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialMotionMagicDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialMotionMagicDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialMotionMagicVoltage(target_position: phoenix6.units.rotation, differential_position: phoenix6.units.rotation, enable_foc: bool = True, target_slot: int = 0, differential_slot: int = 1, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.
- Parameters:
target_position (rotation) – Average position to drive toward in rotations.
differential_position (rotation) – Differential position to drive toward in rotations.
enable_foc (bool) –
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.
target_slot (int) – 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].
differential_slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- target_position#
Average position to drive toward in rotations.
- differential_position#
Differential position to drive toward in rotations.
- enable_foc#
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.
- target_slot#
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].
- differential_slot#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_target_position(new_target_position: phoenix6.units.rotation) DifferentialMotionMagicVoltage #
Modifies this Control Request’s target_position parameter and returns itself for method-chaining and easier to use request API.
Average position to drive toward in rotations.
- Parameters:
new_target_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_position(new_differential_position: phoenix6.units.rotation) DifferentialMotionMagicVoltage #
Modifies this Control Request’s differential_position parameter and returns itself for method-chaining and easier to use request API.
Differential position to drive toward in rotations.
- Parameters:
new_differential_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DifferentialMotionMagicVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_target_slot(new_target_slot: int) DifferentialMotionMagicVoltage #
Modifies this Control Request’s target_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_target_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_differential_slot(new_differential_slot: int) DifferentialMotionMagicVoltage #
Modifies this Control Request’s differential_slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_differential_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DifferentialMotionMagicVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DifferentialMotionMagicVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DifferentialMotionMagicVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialMotionMagicVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.Follower(master_id: int, oppose_master_direction: bool)#
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.
- Parameters:
master_id (int) – Device ID of the master to follow.
oppose_master_direction (bool) – 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.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- master_id#
Device ID of the master to follow.
- oppose_master_direction#
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.
- with_master_id(new_master_id: int) Follower #
Modifies this Control Request’s master_id parameter and returns itself for method-chaining and easier to use request API.
Device ID of the master to follow.
- Parameters:
new_master_id (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_oppose_master_direction(new_oppose_master_direction: bool) Follower #
Modifies this Control Request’s oppose_master_direction parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_oppose_master_direction (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) Follower #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.StrictFollower(master_id: int)#
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.
- Parameters:
master_id (int) – Device ID of the master to follow.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- master_id#
Device ID of the master to follow.
- with_master_id(new_master_id: int) StrictFollower #
Modifies this Control Request’s master_id parameter and returns itself for method-chaining and easier to use request API.
Device ID of the master to follow.
- Parameters:
new_master_id (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) StrictFollower #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialFollower(master_id: int, oppose_master_direction: bool)#
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.
- Parameters:
master_id (int) – Device ID of the differential master to follow.
oppose_master_direction (bool) – 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.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- master_id#
Device ID of the differential master to follow.
- oppose_master_direction#
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.
- with_master_id(new_master_id: int) DifferentialFollower #
Modifies this Control Request’s master_id parameter and returns itself for method-chaining and easier to use request API.
Device ID of the differential master to follow.
- Parameters:
new_master_id (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_oppose_master_direction(new_oppose_master_direction: bool) DifferentialFollower #
Modifies this Control Request’s oppose_master_direction parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_oppose_master_direction (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialFollower #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DifferentialStrictFollower(master_id: int)#
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.
- Parameters:
master_id (int) – Device ID of the differential master to follow.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- master_id#
Device ID of the differential master to follow.
- with_master_id(new_master_id: int) DifferentialStrictFollower #
Modifies this Control Request’s master_id parameter and returns itself for method-chaining and easier to use request API.
Device ID of the differential master to follow.
- Parameters:
new_master_id (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DifferentialStrictFollower #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.NeutralOut#
Request neutral output of actuator. The applied brake type is determined by the NeutralMode configuration.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) NeutralOut #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.CoastOut#
Request coast neutral output of actuator. The bridge is disabled and the rotor is allowed to coast.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) CoastOut #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.StaticBrake#
Applies full neutral-brake by shorting motor leads together.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) StaticBrake #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MusicTone(audio_frequency: phoenix6.units.hertz)#
Plays a single tone at the user specified frequency.
- Parameters:
audio_frequency (hertz) – Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-20000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 20Khz will be capped to 20KHz.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- audio_frequency#
Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-20000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 20Khz will be capped to 20KHz.
- with_audio_frequency(new_audio_frequency: phoenix6.units.hertz) MusicTone #
Modifies this Control Request’s audio_frequency parameter and returns itself for method-chaining and easier to use request API.
Sound frequency to play. A value of zero will silence the device. The effective frequency range is 10-20000Hz. Any nonzero frequency less than 10 Hz will be capped to 10Hz. Any frequency above 20Khz will be capped to 20KHz.
- Parameters:
new_audio_frequency (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MusicTone #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicVelocityDutyCycle(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs. If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile. Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.
- Parameters:
velocity (rotations_per_second) – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
acceleration (rotations_per_second_squared) – 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.
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Target velocity to drive toward in rotations per second. This can be changed on-the fly.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicVelocityDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicVelocityDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicVelocityTorqueCurrentFOC(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, enable_foc: bool = True, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs. If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile. Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.
- Parameters:
velocity (rotations_per_second) – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
acceleration (rotations_per_second_squared) – 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.
enable_foc (bool) –
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.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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.
- enable_foc#
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.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Target velocity to drive toward in rotations per second. This can be changed on-the fly.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicVelocityTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicVelocityTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicVelocityVoltage(velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared = 0.0, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
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. This control mode does not use the CruiseVelocity, Expo_kV, or Expo_kA configs. If the specified acceleration is zero, the Acceleration under Motion Magic® configuration parameter is used instead. This allows for runtime adjustment of acceleration for advanced users. Jerk is also specified in the Motion Magic® persistent configuration values. If Jerk is set to zero, Motion Magic® will produce a trapezoidal acceleration profile. Target velocity can also be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.
- Parameters:
velocity (rotations_per_second) – Target velocity to drive toward in rotations per second. This can be changed on-the fly.
acceleration (rotations_per_second_squared) – 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.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) MotionMagicVelocityVoltage #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Target velocity to drive toward in rotations per second. This can be changed on-the fly.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) MotionMagicVelocityVoltage #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicVelocityVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) MotionMagicVelocityVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicVelocityVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicVelocityVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicVelocityVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicVelocityVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicVelocityVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicExpoDutyCycle(position: phoenix6.units.rotation, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requests Motion Magic® to target a final position using an exponential motion profile. Users can optionally provide a duty cycle feedforward.
Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.
- Parameters:
position (rotation) – Position to drive toward in rotations.
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicExpoDutyCycle #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicExpoDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) MotionMagicExpoDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicExpoDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicExpoDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicExpoDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicExpoDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicExpoDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicExpoVoltage(position: phoenix6.units.rotation, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requests Motion Magic® to target a final position using an exponential motion profile. Users can optionally provide a voltage feedforward.
Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicExpoVoltage #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) MotionMagicExpoVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) MotionMagicExpoVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicExpoVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) MotionMagicExpoVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicExpoVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicExpoVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicExpoVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.MotionMagicExpoTorqueCurrentFOC(position: phoenix6.units.rotation, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro; Requests Motion Magic® to target a final position using an exponential motion profile. Users can optionally provide a torque current feedforward.
Motion Magic® Expo produces a motion profile in real-time while attempting to honor the Cruise Velocity (optional) and the mechanism kV and kA, specified via the Motion Magic® configuration values. Setting Cruise Velocity to 0 will allow the profile to run to the max possible velocity based on Expo_kV. This control mode does not use the Acceleration or Jerk configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- position#
Position to drive toward in rotations.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) MotionMagicExpoTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) MotionMagicExpoTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DynamicMotionMagicDutyCycle(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared, jerk: phoenix6.units.rotations_per_second_cubed, enable_foc: bool = True, feed_forward: float = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro and CANivore; 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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the numerator: +1.0 represents full forward output.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
acceleration (rotations_per_second_squared) – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation
jerk (rotations_per_second_cubed) – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation
enable_foc (bool) –
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.
feed_forward (float) – Feedforward to apply in fractional units between -1 and +1.
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_jerk(new_jerk: phoenix6.units.rotations_per_second_cubed) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s jerk parameter and returns itself for method-chaining and easier to use request API.
Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation
- Parameters:
new_jerk (rotations_per_second_cubed) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: float) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in fractional units between -1 and +1.
- Parameters:
new_feed_forward (float) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DynamicMotionMagicDutyCycle #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DynamicMotionMagicDutyCycle #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DynamicMotionMagicVoltage(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared, jerk: phoenix6.units.rotations_per_second_cubed, enable_foc: bool = True, feed_forward: phoenix6.units.volt = 0.0, slot: int = 0, override_brake_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro and CANivore; 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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is voltage-based, so relevant closed-loop gains will use Volts for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
acceleration (rotations_per_second_squared) – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
jerk (rotations_per_second_cubed) – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
enable_foc (bool) –
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.
feed_forward (volt) – Feedforward to apply in volts
slot (int) – 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].
override_brake_dur_neutral (bool) – 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.
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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.
- enable_foc#
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.
- feed_forward#
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].
- override_brake_dur_neutral#
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.
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) DynamicMotionMagicVoltage #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) DynamicMotionMagicVoltage #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) DynamicMotionMagicVoltage #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_jerk(new_jerk: phoenix6.units.rotations_per_second_cubed) DynamicMotionMagicVoltage #
Modifies this Control Request’s jerk parameter and returns itself for method-chaining and easier to use request API.
Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_jerk (rotations_per_second_cubed) – Parameter to modify
- Returns:
Itself
- Return type:
- with_enable_foc(new_enable_foc: bool) DynamicMotionMagicVoltage #
Modifies this Control Request’s enable_foc parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_enable_foc (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.volt) DynamicMotionMagicVoltage #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in volts
- Parameters:
new_feed_forward (volt) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) DynamicMotionMagicVoltage #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_brake_dur_neutral(new_override_brake_dur_neutral: bool) DynamicMotionMagicVoltage #
Modifies this Control Request’s override_brake_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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.
- Parameters:
new_override_brake_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DynamicMotionMagicVoltage #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DynamicMotionMagicVoltage #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DynamicMotionMagicVoltage #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type:
- class phoenix6.controls.DynamicMotionMagicTorqueCurrentFOC(position: phoenix6.units.rotation, velocity: phoenix6.units.rotations_per_second, acceleration: phoenix6.units.rotations_per_second_squared, jerk: phoenix6.units.rotations_per_second_cubed, feed_forward: phoenix6.units.ampere = 0.0, slot: int = 0, override_coast_dur_neutral: bool = False, limit_forward_motion: bool = False, limit_reverse_motion: bool = False)#
Requires Phoenix Pro and CANivore; 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. This control mode does not use the Expo_kV or Expo_kA configs. Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This control mode is based on torque current, so relevant closed-loop gains will use Amperes for the numerator.
- Parameters:
position (rotation) – Position to drive toward in rotations.
velocity (rotations_per_second) – Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
acceleration (rotations_per_second_squared) – Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
jerk (rotations_per_second_cubed) – Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
feed_forward (ampere) – Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
slot (int) – 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].
override_coast_dur_neutral (bool) – 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).
limit_forward_motion (bool) – Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
limit_reverse_motion (bool) – Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- property name: str#
Gets the name of this control request.
- Returns:
Name of the control request
- Return type:
str
- property control_info: dict#
Gets information about this control request.
- Returns:
Dictonary of control parameter names and corresponding applied values
- Return type:
dict
- 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.
- feed_forward#
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].
- override_coast_dur_neutral#
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).
- limit_forward_motion#
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- limit_reverse_motion#
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- with_position(new_position: phoenix6.units.rotation) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s position parameter and returns itself for method-chaining and easier to use request API.
Position to drive toward in rotations.
- Parameters:
new_position (rotation) – Parameter to modify
- Returns:
Itself
- Return type:
- with_velocity(new_velocity: phoenix6.units.rotations_per_second) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s velocity parameter and returns itself for method-chaining and easier to use request API.
Cruise velocity for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_velocity (rotations_per_second) – Parameter to modify
- Returns:
Itself
- Return type:
- with_acceleration(new_acceleration: phoenix6.units.rotations_per_second_squared) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s acceleration parameter and returns itself for method-chaining and easier to use request API.
Acceleration for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_acceleration (rotations_per_second_squared) – Parameter to modify
- Returns:
Itself
- Return type:
- with_jerk(new_jerk: phoenix6.units.rotations_per_second_cubed) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s jerk parameter and returns itself for method-chaining and easier to use request API.
Jerk for profiling. The signage does not matter as the device will use the absolute value for profile generation.
- Parameters:
new_jerk (rotations_per_second_cubed) – Parameter to modify
- Returns:
Itself
- Return type:
- with_feed_forward(new_feed_forward: phoenix6.units.ampere) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s feed_forward parameter and returns itself for method-chaining and easier to use request API.
Feedforward to apply in torque current in Amperes. User can use motor’s kT to scale Newton-meter to Amperes.
- Parameters:
new_feed_forward (ampere) – Parameter to modify
- Returns:
Itself
- Return type:
- with_slot(new_slot: int) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s slot parameter and returns itself for method-chaining and easier to use request API.
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].
- Parameters:
new_slot (int) – Parameter to modify
- Returns:
Itself
- Return type:
- with_override_coast_dur_neutral(new_override_coast_dur_neutral: bool) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s override_coast_dur_neutral parameter and returns itself for method-chaining and easier to use request API.
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).
- Parameters:
new_override_coast_dur_neutral (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_forward_motion(new_limit_forward_motion: bool) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s limit_forward_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force forward limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_forward_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_limit_reverse_motion(new_limit_reverse_motion: bool) DynamicMotionMagicTorqueCurrentFOC #
Modifies this Control Request’s limit_reverse_motion parameter and returns itself for method-chaining and easier to use request API.
Set to true to force reverse limiting. This allows users to use other limit switch sensors connected to robot controller. This also allows use of active sensors that require external power.
- Parameters:
new_limit_reverse_motion (bool) – Parameter to modify
- Returns:
Itself
- Return type:
- with_update_freq_hz(new_update_freq_hz: phoenix6.units.hertz) DynamicMotionMagicTorqueCurrentFOC #
Sets the period at which this control will update at. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.
- Parameters:
new_update_freq_hz (hertz) – Parameter to modify
- Returns:
Itself
- Return type: