|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Ramp configuration structure. More...
#include <tmc51x0_types.hpp>
Public Member Functions | |
| RampConfig ()=default | |
| Default constructor. | |
Public Attributes | |
| VelocityValue | vstart {0.0f, Unit::Steps} |
| Start velocity (0 = can be set to zero if not used) | |
| VelocityValue | vstop {10.0f, Unit::Steps} |
| Stop velocity (must be >= VSTART, minimum 1 recommended) | |
| VelocityValue | vmax {0.0f, Unit::Steps} |
| Maximum velocity (0 = must be set via SetMaxSpeed() before motion) | |
| VelocityValue | v1 {0.0f, Unit::Steps} |
| Transition velocity (switches between A1/AMAX and D1/DMAX, 0 = disabled) | |
| AccelerationValue | amax {0.0f, Unit::Steps} |
| Maximum acceleration (used above V1, 0 = must be set via SetAcceleration() before motion) | |
| AccelerationValue | a1 {0.0f, Unit::Steps} |
| First acceleration (used between VSTART and V1, 0 = use AMAX) | |
| AccelerationValue | dmax {0.0f, Unit::Steps} |
| Maximum deceleration (used above V1, 0 = uses AMAX value) | |
| AccelerationValue | d1 {100.0f, Unit::Steps} |
| First deceleration (used between VSTOP and V1, must not be 0 in positioning mode) | |
| float | tpowerdown_ms {437.0F} |
| float | tzerowait_ms |
| Velocity-zero wait time (TZEROWAIT) | |
Ramp configuration structure.
Configuration parameters for the TMC51x0 ramp generator. The ramp generator provides two-phase acceleration and deceleration with programmable start/stop velocities and transition speed (V1) for optimal motor torque utilization.
|
default |
Default constructor.
Initializes with recommended default values:
| AccelerationValue tmc51x0::RampConfig::a1 {0.0f, Unit::Steps} |
First acceleration (used between VSTART and V1, 0 = use AMAX)
| AccelerationValue tmc51x0::RampConfig::amax {0.0f, Unit::Steps} |
Maximum acceleration (used above V1, 0 = must be set via SetAcceleration() before motion)
| AccelerationValue tmc51x0::RampConfig::d1 {100.0f, Unit::Steps} |
First deceleration (used between VSTOP and V1, must not be 0 in positioning mode)
| AccelerationValue tmc51x0::RampConfig::dmax {0.0f, Unit::Steps} |
Maximum deceleration (used above V1, 0 = uses AMAX value)
| float tmc51x0::RampConfig::tpowerdown_ms {437.0F} |
Power down delay in milliseconds (0-5600ms at 12MHz, automatically converted) Time before motor power down after standstill. Conversion: tpowerdown_register = time_ms * fCLK / (2^18 * 1000)
| float tmc51x0::RampConfig::tzerowait_ms |
Velocity-zero wait time (TZEROWAIT)
Defines the time the internal ramp generator waits when velocity reaches zero before continuing with the next acceleration or deceleration phase.
This allows precise stop-and-go motion, mechanical settle time, and synchronization at standstill. Useful for accurate positioning moves, step-accurate cornering in CNC applications, and ensuring mechanical settle time.
Units:
Range:
Total wait time calculation:
Conversion from milliseconds:
Important Notes:
Typical Usage:
| VelocityValue tmc51x0::RampConfig::v1 {0.0f, Unit::Steps} |
Transition velocity (switches between A1/AMAX and D1/DMAX, 0 = disabled)
| VelocityValue tmc51x0::RampConfig::vmax {0.0f, Unit::Steps} |
Maximum velocity (0 = must be set via SetMaxSpeed() before motion)
| VelocityValue tmc51x0::RampConfig::vstart {0.0f, Unit::Steps} |
Start velocity (0 = can be set to zero if not used)
| VelocityValue tmc51x0::RampConfig::vstop {10.0f, Unit::Steps} |
Stop velocity (must be >= VSTART, minimum 1 recommended)