HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
TMC9660::StopEvents Struct Reference

Configure automatic stop/latch behaviour for deviation, switches. More...

#include <TMC9660.hpp>

Collaboration diagram for TMC9660::StopEvents:

Public Member Functions

bool enableDeviationStop (uint32_t maxVelError, uint32_t maxPosError, bool softStop=true) noexcept
 Stop when ramp target deviates from actual > thresholds.
 
bool configureReferenceSwitches (uint8_t mask, bool invertL, bool invertR, bool invertH, bool swapLR) noexcept
 Configure reference / limit-switch inputs.
 
bool getAndClearLatchedPosition (int32_t &pos) noexcept
 Read and clear the latched position from a switch event.
 

Private Member Functions

 StopEvents (TMC9660 &parent) noexcept
 

Private Attributes

TMC9660driver
 

Friends

class TMC9660
 

Detailed Description

Configure automatic stop/latch behaviour for deviation, switches.

Constructor & Destructor Documentation

◆ StopEvents()

TMC9660::StopEvents::StopEvents ( TMC9660 parent)
inlineexplicitprivatenoexcept

Member Function Documentation

◆ configureReferenceSwitches()

bool TMC9660::StopEvents::configureReferenceSwitches ( uint8_t  mask,
bool  invertL,
bool  invertR,
bool  invertH,
bool  swapLR 
)
noexcept

Configure reference / limit-switch inputs.

Parameters
maskBit-mask 0…7 ; see REFERENCE_SWITCH_ENABLE.
invertL,R,Hinvert individual polarities.
swapLRswap left/right wiring.

Configure reference and limit switch inputs.

Parameters
maskBit mask of switches to enable (see REFERENCE_SWITCH_ENABLE).
invertLInvert left switch polarity.
invertRInvert right switch polarity.
invertHInvert home switch polarity.
swapLRSwap left and right wiring.
Returns
true on success
See also
REFERENCE_SWITCH_* parameters in the datasheet. REFERENCE_SWITCH_*
Datasheet REFERENCE_SWITCH_ENABLE

◆ enableDeviationStop()

bool TMC9660::StopEvents::enableDeviationStop ( uint32_t  maxVelError,
uint32_t  maxPosError,
bool  softStop = true 
)
noexcept

Stop when ramp target deviates from actual > thresholds.

Stop when ramp target deviates from actual values beyond the allowed thresholds.

Parameters
maxVelErrorMaximum allowed velocity error.
maxPosErrorMaximum allowed position error.
softStopUse soft stop instead of immediate stop when true.
Returns
true on success
See also
EVENT_STOP_SETTINGS and STOP_ON_*_DEVIATION in the datasheet. STOP_ON_*_DEVIATION + EVENT_STOP_SETTINGS
Datasheet EVENT_STOP_SETTINGS

◆ getAndClearLatchedPosition()

bool TMC9660::StopEvents::getAndClearLatchedPosition ( int32_t &  pos)
noexcept

Read and clear the latched position from a switch event.

Parameters
[out]posLatched position value.
Returns
true on success
See also
LATCH_POSITION / RAMPER_LATCHED in the datasheet. LATCH_POSITION / RAMPER_LATCHED
Datasheet LATCH_POSITION

Friends And Related Symbol Documentation

◆ TMC9660

friend class TMC9660
friend

Member Data Documentation

◆ driver

TMC9660& TMC9660::StopEvents::driver
private

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