Configure automatic stop/latch behaviour for deviation, switches.
More...
#include <TMC9660.hpp>
|
| 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.
|
| |
Configure automatic stop/latch behaviour for deviation, switches.
◆ StopEvents()
| TMC9660::StopEvents::StopEvents |
( |
TMC9660 & |
parent | ) |
|
|
inlineexplicitprivatenoexcept |
◆ configureReferenceSwitches()
| bool TMC9660::StopEvents::configureReferenceSwitches |
( |
uint8_t |
mask, |
|
|
bool |
invertL, |
|
|
bool |
invertR, |
|
|
bool |
invertH, |
|
|
bool |
swapLR |
|
) |
| |
|
noexcept |
Configure reference / limit-switch inputs.
- Parameters
-
| mask | Bit-mask 0…7 ; see REFERENCE_SWITCH_ENABLE. |
| invertL,R,H | invert individual polarities. |
| swapLR | swap left/right wiring. |
Configure reference and limit switch inputs.
- Parameters
-
| mask | Bit mask of switches to enable (see REFERENCE_SWITCH_ENABLE). |
| invertL | Invert left switch polarity. |
| invertR | Invert right switch polarity. |
| invertH | Invert home switch polarity. |
| swapLR | Swap 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
-
| maxVelError | Maximum allowed velocity error. |
| maxPosError | Maximum allowed position error. |
| softStop | Use 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] | pos | Latched position value. |
- Returns
- true on success
- See also
- LATCH_POSITION / RAMPER_LATCHED in the datasheet. LATCH_POSITION / RAMPER_LATCHED
-
Datasheet LATCH_POSITION
◆ TMC9660
◆ driver
| TMC9660& TMC9660::StopEvents::driver |
|
private |
The documentation for this struct was generated from the following files: