Struct sstep_ctrl_cfg¶
Control and motion parameters. More...
#include <sstep_ctrl.h>
Public Attributes¶
| Type | Name |
|---|---|
| uint32_t | accel Acceleration [microsteps/s^2]. |
| uint32_t | current_bw_hz Current loop bandwidth [Hz]; the PI gains are computed from R, L and this value. |
| uint32_t | decel Deceleration [microsteps/s^2]; 0 = same as accel. |
| enum sstep_drive_mode | drive_mode Current or voltage drive. |
| uint32_t | fast_loop_hz Rate of sstep_fast_loop() [Hz]. |
| uint32_t | hold_delay_ms Standstill time before switching to i_hold_ma [ms]. |
| uint32_t | i_hold_ma Peak phase current at standstill [mA]. |
| uint32_t | i_run_ma Peak phase current while moving [mA]. |
| uint16_t | microsteps Microsteps per full step (power of two, 1 . |
| uint32_t | slow_loop_hz Rate of sstep_slow_loop() [Hz]. |
| uint32_t | stall_filter_us Time constant of the back-EMF low-pass filter [us], at least one fast loop period. |
| uint32_t | stall_speed Slip threshold [microsteps/s]: rotor speed that counts as motion while the command is at rest or slower than this; above it, the synchronism check. |
| uint16_t | stall_sync_pct Synchronism threshold [%] (1 . |
| uint32_t | stall_time_ms Stall detection: time the stall condition must persist before SSTEP_FAULT_STALL [ms]; 0 = stall detection off (the other stall_* fields are then ignored). |
| uint32_t | v_max Maximum velocity [microsteps/s]. |
Detailed Description¶
All of them except the loop rates can be changed at run time with the sstep_set_*() functions.
Public Attributes Documentation¶
variable accel¶
Acceleration [microsteps/s^2].
variable current_bw_hz¶
Current loop bandwidth [Hz]; the PI gains are computed from R, L and this value.
variable decel¶
Deceleration [microsteps/s^2]; 0 = same as accel.
variable drive_mode¶
Current or voltage drive.
variable fast_loop_hz¶
Rate of sstep_fast_loop() [Hz].
variable hold_delay_ms¶
Standstill time before switching to i_hold_ma [ms].
variable i_hold_ma¶
Peak phase current at standstill [mA].
variable i_run_ma¶
Peak phase current while moving [mA].
variable microsteps¶
Microsteps per full step (power of two, 1 .
variable slow_loop_hz¶
Rate of sstep_slow_loop() [Hz].
variable stall_filter_us¶
Time constant of the back-EMF low-pass filter [us], at least one fast loop period.
variable stall_speed¶
Slip threshold [microsteps/s]: rotor speed that counts as motion while the command is at rest or slower than this; above it, the synchronism check.
variable stall_sync_pct¶
Synchronism threshold [%] (1 .
. 100): smallest back-EMF along the commanded motion, relative to Ke * speed.
variable stall_time_ms¶
Stall detection: time the stall condition must persist before SSTEP_FAULT_STALL [ms]; 0 = stall detection off (the other stall_* fields are then ignored).
Requires SSTEP_DRIVE_CURRENT and ke_uv_s_per_rad > 0.
variable v_max¶
Maximum velocity [microsteps/s].
The documentation for this class was generated from the following file inc/sstep_ctrl.h