|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Options for changing microstep resolution (CHOPCONF.MRES) More...
#include <tmc51x0_types.hpp>
Public Attributes | |
| bool | preserve_physical_units {true} |
| Preserve physical meaning of position and motion profile on MRES change. | |
| bool | require_standstill {true} |
| Require standstill before changing MRES. | |
| bool | rescale_encoder {true} |
| Reapply encoder scaling after MRES change (if encoder is configured) | |
Options for changing microstep resolution (CHOPCONF.MRES)
The TMC51x0 uses microsteps as the native unit for position (XACTUAL/XTARGET) and as the physical base for the internal ramp generator timing (velocity/acceleration scaling). Changing microstep resolution therefore changes the meaning of stored register values unless they are rescaled.
These options control whether the driver preserves the physical meaning of positions and motion profiles when MRES changes.
| bool tmc51x0::MicrostepChangeOptions::preserve_physical_units {true} |
Preserve physical meaning of position and motion profile on MRES change.
When true (default), the driver rescales all dependent registers so that:
When false, the driver performs a "raw" MRES change and does not touch other registers.
| bool tmc51x0::MicrostepChangeOptions::require_standstill {true} |
Require standstill before changing MRES.
When true (default), the driver rejects MRES changes unless the motor is in standstill. This avoids discontinuities while moving.
| bool tmc51x0::MicrostepChangeOptions::rescale_encoder {true} |
Reapply encoder scaling after MRES change (if encoder is configured)
Encoder mapping uses microsteps internally (ENC_CONST and deviation thresholds), so it typically must be recalculated after MRES changes to preserve physical meaning.