Made changes reflecting PR comments.

Added torque_ramp_rate to controller config.
Changed INPUT_MODE_CURRENT_RAMP to INPUT_MODE_TORQUE_RAMP for controller input mode enum.
Torque limits and current limits are now observed seperately. Torque limit is in the controller, current limit is in the motor object.
Fixed torque -> current calculation in motor_update to handle ACIM motors.
This commit is contained in:
pjohnson
2020-06-17 13:15:36 -04:00
parent d78119e29f
commit ceabd24582
9 changed files with 35 additions and 32 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ Possible values are:
* `INPUT_MODE_POS_FILTER`
* `INPUT_MODE_MIX_CHANNELS`
* `INPUT_MODE_TRAP_TRAJ`
* `INPUT_MODE_CURRENT_RAMP`
* `INPUT_MODE_TORQUE_RAMP`
* `INPUT_MODE_MIRROR`
For more information, see [input_modes](input_modes.md).
@@ -97,7 +97,7 @@ Possible values are:
* `INPUT_MODE_POS_FILTER`
* `INPUT_MODE_MIX_CHANNELS`
* `INPUT_MODE_TRAP_TRAJ`
* `INPUT_MODE_CURRENT_RAMP`
* `INPUT_MODE_TORQUE_RAMP`
* `INPUT_MODE_MIRROR`
## System monitoring commands
+1 -1
View File
@@ -348,7 +348,7 @@ You can now control the velocity with `axis.controller.input_vel = 5000` [count/
### Torque control
Set `axis.controller.config.control_mode = CONTROL_MODE_CURRENT_CONTROL`.<br>
You can now control the torque with `axis.controller.input_torque = 3` [Nm].
You can now control the torque with `axis.controller.input_torque = 0.1` [Nm].
Note: If you exceed `vel_limit` in current control mode, the current is reduced. To disable this, set `axis.controller.enable_current_mode_vel_limit = False`.
+4 -4
View File
@@ -13,7 +13,7 @@ The Input Modes currently valid are:
* `INPUT_MODE_POS_FILTER`
* `INPUT_MODE_MIX_CHANNELS`
* `INPUT_MODE_TRAP_TRAJ`
* `INPUT_MODE_CURRENT_RAMP`
* `INPUT_MODE_TORQUE_RAMP`
* `INPUT_MODE_MIRROR`
---
@@ -85,11 +85,11 @@ Implementes an online trapezoidal trajectory planner.
### Valid Control Modes:
* `CONTROL_MODE_POSITION_CONTROL`
## INPUT_MODE_CURRENT_RAMP
Ramp a current command from the current value to the target value.
## INPUT_MODE_TORQUE_RAMP
Ramp a torque command from the current value to the target value.
### Configuration Values:
* `<axis>.controller.config.current_ramp_rate`
* `<axis>.controller.config.torque_ramp_rate`
### Valid Inputs:
* `input_torque`