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

Subsystem controlling the brake chopper and mechanical brake features. More...

#include <tmc9660.hpp>

Collaboration diagram for tmc9660::TMC9660< CommType >::Brake:
[legend]

Classes

struct  BrakeConfig
 Configuration structure for brake auto-configuration. More...
 

Public Member Functions

bool enableChopper (bool enable) noexcept
 Enable or disable the brake chopper functionality.
 
bool setVoltageLimit (float voltage) noexcept
 Set the overvoltage threshold for the brake chopper.
 
bool setHysteresis (float voltage) noexcept
 Set the hysteresis for the brake chopper threshold.
 
bool release () noexcept
 Trigger a release of the mechanical brake.
 
bool engage () noexcept
 Engage (lock) the mechanical brake.
 
bool setReleasingDutyCycle (uint8_t percent) noexcept
 Set the PWM duty cycle for releasing the brake.
 
bool setHoldingDutyCycle (uint8_t percent) noexcept
 Set the PWM duty cycle for holding the brake released.
 
bool setReleasingDuration (uint16_t milliseconds) noexcept
 Set the duration of the brake release initial phase.
 
bool invertOutput (bool invert) noexcept
 Invert or normalize the brake output signal polarity.
 
bool configureAuto (const BrakeConfig &config) noexcept
 Auto-configure brake parameters.
 

Private Member Functions

 Brake (TMC9660 &parent) noexcept
 

Private Attributes

TMC9660driver
 

Friends

class TMC9660
 

Detailed Description

template<typename CommType>
struct tmc9660::TMC9660< CommType >::Brake

Subsystem controlling the brake chopper and mechanical brake features.

Constructor & Destructor Documentation

◆ Brake()

template<typename CommType >
tmc9660::TMC9660< CommType >::Brake::Brake ( TMC9660 & parent)
inlineexplicitprivatenoexcept

Member Function Documentation

◆ configureAuto()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::configureAuto ( const BrakeConfig & config)
noexcept

Auto-configure brake parameters.

Configures brake chopper and mechanical brake parameters based on high-level requirements.

Parameters
configBrake configuration (see BrakeConfig)
Returns
true if all configurations succeeded, false otherwise

◆ enableChopper()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::enableChopper ( bool enable)
noexcept

Enable or disable the brake chopper functionality.

Parameters
enableTrue to enable the brake chopper, false to disable it.
Returns
True if the command was sent and acknowledged.

◆ engage()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::engage ( )
noexcept

Engage (lock) the mechanical brake.

Returns
True if the command was sent successfully.

◆ invertOutput()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::invertOutput ( bool invert)
noexcept

Invert or normalize the brake output signal polarity.

Parameters
invertTrue to invert the brake output, false for normal.
Returns
True if the parameter was written successfully.

◆ release()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::release ( )
noexcept

Trigger a release of the mechanical brake.

Returns
True if the command was sent successfully.

◆ setHoldingDutyCycle()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::setHoldingDutyCycle ( uint8_t percent)
noexcept

Set the PWM duty cycle for holding the brake released.

Parameters
percentDuty cycle (0 to 99%).
Returns
True if the parameter was written successfully.

◆ setHysteresis()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::setHysteresis ( float voltage)
noexcept

Set the hysteresis for the brake chopper threshold.

Parameters
voltageHysteresis in volts (0.0 to 5.0 V).
Returns
True if the parameter was written successfully.

◆ setReleasingDuration()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::setReleasingDuration ( uint16_t milliseconds)
noexcept

Set the duration of the brake release initial phase.

Parameters
millisecondsDuration in ms (0 to 65535).
Returns
True if the parameter was written successfully.

◆ setReleasingDutyCycle()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::setReleasingDutyCycle ( uint8_t percent)
noexcept

Set the PWM duty cycle for releasing the brake.

Parameters
percentDuty cycle (0 to 99%).
Returns
True if the parameter was written successfully.

◆ setVoltageLimit()

template<typename CommType >
bool tmc9660::TMC9660< CommType >::Brake::setVoltageLimit ( float voltage)
noexcept

Set the overvoltage threshold for the brake chopper.

Parameters
voltageThreshold voltage in volts (5.0 to 100.0 V).
Returns
True if the parameter was written successfully.

Friends And Related Symbol Documentation

◆ TMC9660

template<typename CommType >
friend class TMC9660
friend

Member Data Documentation

◆ driver

template<typename CommType >
TMC9660& tmc9660::TMC9660< CommType >::Brake::driver
private

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