HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
tmc9660::TMC9660< CommType >::Ramp::RampConfig Struct Reference

Configuration structure for ramp auto-configuration. More...

#include <tmc9660.hpp>

Public Attributes

uint32_t maxVelocity = 134217727
 Maximum velocity in internal units (required).
 
std::optional< uint32_tmaxAcceleration
 Maximum acceleration in µ units/s² (optional, default: 1000).
 
std::optional< uint32_tacceleration1
 First acceleration segment in µ units/s² (optional, default: 8000).
 
std::optional< uint32_tacceleration2
 Second acceleration segment in µ units/s² (optional, default: 4000).
 
std::optional< uint32_tmaxDeceleration
 Maximum deceleration in µ units/s² (optional, default: 1000).
 
std::optional< uint32_tdeceleration1
 First deceleration segment in µ units/s² (optional, default: 8000).
 
std::optional< uint32_tdeceleration2
 Second deceleration segment in µ units/s² (optional, default: 8000).
 
std::optional< uint32_tvelocityThreshold1
 Velocity threshold 1 in internal units (optional, default: 0).
 
std::optional< uint32_tvelocityThreshold2
 Velocity threshold 2 in internal units (optional, default: 0).
 
std::optional< uint32_tstartVelocity
 Start velocity in internal units (optional, default: 0).
 
std::optional< uint32_tstopVelocity
 Stop velocity in internal units (optional, default: 1).
 
std::optional< uint16_ttimeAtVmax
 Minimum time at VMAX before deceleration (optional, default: 0).
 
std::optional< uint16_ttimeZeroWait
 Wait time at end of ramp (optional, default: 0).
 
std::optional< boolenableRamp
 Enable ramp generator (optional, default: false).
 
std::optional< boolenableDirectVelocityMode
 Enable direct velocity mode (optional, default: true).
 
std::optional< boolenableVelocityFeedForward
 Enable velocity feedforward (optional, default: false).
 
std::optional< boolenableAccelerationFeedForward
 Enable acceleration feedforward (optional, default: false).
 
std::optional< uint16_taccelerationFeedForwardGain
 Acceleration feedforward gain (optional, default: 8).
 
std::optional< tmc9660::tmcl::AccelerationFFShiftaccelerationFeedForwardShift
 Acceleration feedforward shift (optional, default: SHIFT_4).
 

Detailed Description

template<typename CommType>
struct tmc9660::TMC9660< CommType >::Ramp::RampConfig

Configuration structure for ramp auto-configuration.

Member Data Documentation

◆ acceleration1

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::acceleration1

First acceleration segment in µ units/s² (optional, default: 8000).

Acceleration at low velocities (RAMP_A1). Typically higher than A2/AMAX for smooth startup. First acceleration segment [µ units/s²] (optional, default: 8000)

◆ acceleration2

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::acceleration2

Second acceleration segment in µ units/s² (optional, default: 4000).

Acceleration at medium velocities (RAMP_A2). Intermediate value between A1 and AMAX. Second acceleration segment [µ units/s²] (optional, default: 4000)

◆ accelerationFeedForwardGain

template<typename CommType >
std::optional<uint16_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::accelerationFeedForwardGain

Acceleration feedforward gain (optional, default: 8).

Gain for acceleration feedforward term (ACCELERATION_FF_GAIN). Range: 0-65535. Acceleration FF gain [0-65535] (optional, default: 8)

◆ accelerationFeedForwardShift

template<typename CommType >
std::optional<tmc9660::tmcl::AccelerationFFShift> tmc9660::TMC9660< CommType >::Ramp::RampConfig::accelerationFeedForwardShift

Acceleration feedforward shift (optional, default: SHIFT_4).

Shift for acceleration feedforward term (ACCELERATION_FF_SHIFT). Acceleration FF shift (optional, default: SHIFT_4_BIT)

◆ deceleration1

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::deceleration1

First deceleration segment in µ units/s² (optional, default: 8000).

Deceleration at medium velocities (RAMP_D1). First deceleration segment [µ units/s²] (optional, default: 8000)

◆ deceleration2

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::deceleration2

Second deceleration segment in µ units/s² (optional, default: 8000).

Deceleration at low velocities (RAMP_D2). Typically higher for smooth stopping. Second deceleration segment [µ units/s²] (optional, default: 8000)

◆ enableAccelerationFeedForward

template<typename CommType >
std::optional<bool> tmc9660::TMC9660< CommType >::Ramp::RampConfig::enableAccelerationFeedForward

Enable acceleration feedforward (optional, default: false).

When enabled, acceleration feedforward term is added to improve tracking. Enable acceleration feedforward (optional, default: false)

◆ enableDirectVelocityMode

template<typename CommType >
std::optional<bool> tmc9660::TMC9660< CommType >::Ramp::RampConfig::enableDirectVelocityMode

Enable direct velocity mode (optional, default: true).

When enabled, ramp directly controls velocity without PI loop. When disabled, ramp output feeds into velocity PI controller. Enable direct velocity mode (optional, default: true)

◆ enableRamp

template<typename CommType >
std::optional<bool> tmc9660::TMC9660< CommType >::Ramp::RampConfig::enableRamp

Enable ramp generator (optional, default: false).

When enabled, the ramp generator controls acceleration/deceleration. When disabled, direct velocity commands are used. Enable ramp generator (optional, default: false)

◆ enableVelocityFeedForward

template<typename CommType >
std::optional<bool> tmc9660::TMC9660< CommType >::Ramp::RampConfig::enableVelocityFeedForward

Enable velocity feedforward (optional, default: false).

When enabled, velocity feedforward term is added to improve tracking. Enable velocity feedforward (optional, default: false)

◆ maxAcceleration

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::maxAcceleration

Maximum acceleration in µ units/s² (optional, default: 1000).

Top acceleration value (RAMP_AMAX). Higher values = faster acceleration. Typical range: 500-5000 for most applications. Maximum acceleration [µ units/s²] (optional, default: 1000)

◆ maxDeceleration

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::maxDeceleration

Maximum deceleration in µ units/s² (optional, default: 1000).

Top deceleration value (RAMP_DMAX). Can be different from acceleration for asymmetric profiles. Maximum deceleration [µ units/s²] (optional, default: 1000)

◆ maxVelocity

template<typename CommType >
uint32_t tmc9660::TMC9660< CommType >::Ramp::RampConfig::maxVelocity = 134217727

Maximum velocity in internal units (required).

Maximum velocity that the ramp generator can command. Range: 0-134217727 (default: 134217727 = unlimited) Maximum velocity [0-134217727] (default: unlimited)

◆ startVelocity

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::startVelocity

Start velocity in internal units (optional, default: 0).

Initial velocity when ramp starts (RAMP_VSTART). Start velocity [internal units] (optional, default: 0)

◆ stopVelocity

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::stopVelocity

Stop velocity in internal units (optional, default: 1).

Velocity at which ramp considers motion stopped (RAMP_VSTOP). Stop velocity [internal units] (optional, default: 1)

◆ timeAtVmax

template<typename CommType >
std::optional<uint16_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::timeAtVmax

Minimum time at VMAX before deceleration (optional, default: 0).

Minimum time to maintain maximum velocity before starting deceleration (RAMP_TVMAX). Units: velocity loop cycles. Minimum time at VMAX [cycles] (optional, default: 0)

◆ timeZeroWait

template<typename CommType >
std::optional<uint16_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::timeZeroWait

Wait time at end of ramp (optional, default: 0).

Time to wait after ramp completes before next move (RAMP_TZEROWAIT). Units: velocity loop cycles. Wait time at end [cycles] (optional, default: 0)

◆ velocityThreshold1

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::velocityThreshold1

Velocity threshold 1 in internal units (optional, default: 0).

Velocity threshold for switching from A1/D1 to A2/D2 (RAMP_V1). Velocity threshold 1 [internal units] (optional, default: 0)

◆ velocityThreshold2

template<typename CommType >
std::optional<uint32_t> tmc9660::TMC9660< CommType >::Ramp::RampConfig::velocityThreshold2

Velocity threshold 2 in internal units (optional, default: 0).

Velocity threshold for switching from A2/D2 to AMAX/DMAX (RAMP_V2). Velocity threshold 2 [internal units] (optional, default: 0)


The documentation for this struct was generated from the following file: