Prusa MINI Firmware overview
delta.h File Reference
#include "../core/types.h"

Go to the source code of this file.

Macros

#define DELTA_Z(V, T)
 
#define DELTA_IK(V)   delta.set(DELTA_Z(V, A_AXIS), DELTA_Z(V, B_AXIS), DELTA_Z(V, C_AXIS))
 

Functions

void recalc_delta_settings ()
 
void inverse_kinematics (const xyz_pos_t &raw)
 
float delta_safe_distance_from_top ()
 
void forward_kinematics_DELTA (const float &z1, const float &z2, const float &z3)
 
FORCE_INLINE void forward_kinematics_DELTA (const abc_float_t &point)
 
void home_delta ()
 

Variables

float delta_height
 
abc_float_t delta_endstop_adj
 
float delta_radius
 
float delta_diagonal_rod
 
float delta_segments_per_second
 
float delta_calibration_radius
 
abc_float_t delta_tower_angle_trim
 
xy_float_t delta_tower [ABC]
 
abc_float_t delta_diagonal_rod_2_tower
 
float delta_clip_start_height
 

Macro Definition Documentation

◆ DELTA_Z

#define DELTA_Z (   V,
 
)
Value:
V.z + SQRT( \
delta_tower[T].x - V.x, \
delta_tower[T].y - V.y \
) \
)

Delta Inverse Kinematics

Calculate the tower positions for a given machine position, storing the result in the delta[] array.

This is an expensive calculation, requiring 3 square roots per segmented linear move, and strains the limits of a Mega2560 with a Graphical Display.

Suggested optimizations include:

  • Disable the home_offset (M206) and/or position_shift (G92) features to remove up to 12 float additions.
  • Use a fast-inverse-sqrt function and add the reciprocal. (see above)

◆ DELTA_IK

#define DELTA_IK (   V)    delta.set(DELTA_Z(V, A_AXIS), DELTA_Z(V, B_AXIS), DELTA_Z(V, C_AXIS))

Function Documentation

◆ recalc_delta_settings()

void recalc_delta_settings ( )

Recalculate factors used for delta kinematics whenever settings have been changed (e.g., by M665).

◆ inverse_kinematics()

void inverse_kinematics ( const xyz_pos_t raw)
Here is the caller graph for this function:

◆ delta_safe_distance_from_top()

float delta_safe_distance_from_top ( )

Calculate the highest Z position where the effector has the full range of XY motion.

Here is the caller graph for this function:

◆ forward_kinematics_DELTA() [1/2]

void forward_kinematics_DELTA ( const float &  z1,
const float &  z2,
const float &  z3 
)

Delta Forward Kinematics

See the Wikipedia article "Trilateration" https://en.wikipedia.org/wiki/Trilateration

Establish a new coordinate system in the plane of the three carriage points. This system has its origin at tower1, with tower2 on the X axis. Tower3 is in the X-Y plane with a Z component of zero. We will define unit vectors in this coordinate system in our original coordinate system. Then when we calculate the Xnew, Ynew and Znew values, we can translate back into the original system by moving along those unit vectors by the corresponding values.

Variable names matched to Marlin, c-version, and avoid the use of any vector library.

by Andreas Hardtung 2016-06-07 based on a Java function from "Delta Robot Kinematics V3" by Steve Graves

The result is stored in the cartes[] array.

Here is the caller graph for this function:

◆ forward_kinematics_DELTA() [2/2]

FORCE_INLINE void forward_kinematics_DELTA ( const abc_float_t point)
111  {
112  forward_kinematics_DELTA(point.a, point.b, point.c);
113 }
Here is the call graph for this function:

◆ home_delta()

void home_delta ( )

Variable Documentation

◆ delta_height

float delta_height

Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]

Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. delta.h - Delta-specific functions

◆ delta_endstop_adj

abc_float_t delta_endstop_adj

◆ delta_radius

float delta_radius

◆ delta_diagonal_rod

float delta_diagonal_rod

◆ delta_segments_per_second

float delta_segments_per_second

◆ delta_calibration_radius

float delta_calibration_radius

◆ delta_tower_angle_trim

abc_float_t delta_tower_angle_trim

◆ delta_tower

xy_float_t delta_tower[ABC]

◆ delta_diagonal_rod_2_tower

abc_float_t delta_diagonal_rod_2_tower

◆ delta_clip_start_height

float delta_clip_start_height
XYZval::a
T a
Definition: types.h:287
delta_diagonal_rod_2_tower
abc_float_t delta_diagonal_rod_2_tower
HYPOT2
#define HYPOT2(x, y)
Definition: macros.h:100
delta_tower
xy_float_t delta_tower[ABC]
XYZval::b
T b
Definition: types.h:287
SQRT
#define SQRT(x)
Definition: macros.h:281
XYval::x
T x
Definition: types.h:185
XYval::y
T y
Definition: types.h:185
forward_kinematics_DELTA
void forward_kinematics_DELTA(const float &z1, const float &z2, const float &z3)
XYZval::c
T c
Definition: types.h:287