Browse Source

Merge pull request #8624 from thinkyhead/bf2_skew_correction

[2.0] Skew Correction
pull/1/head
Scott Lahteine 7 years ago
committed by GitHub
parent
commit
98aba6a534
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .travis.yml
  2. 59
      Marlin/Configuration.h
  3. 59
      Marlin/src/config/default/Configuration.h
  4. 59
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  5. 59
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  6. 59
      Marlin/src/config/examples/Anet/A6/Configuration.h
  7. 59
      Marlin/src/config/examples/Anet/A8/Configuration.h
  8. 59
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  9. 59
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  10. 59
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  11. 59
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  12. 59
      Marlin/src/config/examples/Cartesio/Configuration.h
  13. 59
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  14. 59
      Marlin/src/config/examples/Felix/Configuration.h
  15. 59
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  16. 59
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  17. 59
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  18. 59
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  19. 59
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  20. 59
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  21. 59
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  22. 59
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  23. 59
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  24. 59
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  25. 59
      Marlin/src/config/examples/RigidBot/Configuration.h
  26. 59
      Marlin/src/config/examples/SCARA/Configuration.h
  27. 59
      Marlin/src/config/examples/STM32F10/Configuration.h
  28. 59
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  29. 59
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  30. 59
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  31. 59
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  32. 59
      Marlin/src/config/examples/Velleman/K8400/Configuration.h
  33. 59
      Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
  34. 59
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  35. 59
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
  36. 59
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  37. 59
      Marlin/src/config/examples/delta/generic/Configuration.h
  38. 59
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  39. 59
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  40. 59
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  41. 59
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  42. 59
      Marlin/src/config/examples/makibox/Configuration.h
  43. 59
      Marlin/src/config/examples/tvrrug/Round2/Configuration.h
  44. 59
      Marlin/src/config/examples/wt150/Configuration.h
  45. 4
      Marlin/src/core/language.h
  46. 89
      Marlin/src/gcode/calibrate/M852.cpp
  47. 6
      Marlin/src/gcode/gcode.cpp
  48. 5
      Marlin/src/gcode/gcode.h
  49. 43
      Marlin/src/inc/Conditionals_post.h
  50. 14
      Marlin/src/inc/SanityCheck.h
  51. 3
      Marlin/src/lcd/language/language_en.h
  52. 73
      Marlin/src/module/configuration_store.cpp
  53. 115
      Marlin/src/module/planner.cpp
  54. 17
      Marlin/src/module/planner.h
  55. 2
      Marlin/src/module/temperature.cpp
  56. 2
      Marlin/src/module/temperature.h

2
.travis.yml

@ -62,7 +62,7 @@ script:
- opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
- opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
- opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
- opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
- opt_set ABL_GRID_POINTS_X 16 - opt_set ABL_GRID_POINTS_X 16
- opt_set ABL_GRID_POINTS_Y 16 - opt_set ABL_GRID_POINTS_Y 16

59
Marlin/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/default/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h

@ -852,7 +852,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1059,6 +1059,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (8*60) #define HOMING_FEEDRATE_Z (8*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Anet/A6/Configuration.h

@ -951,7 +951,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1196,6 +1196,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Anet/A8/Configuration.h

@ -838,7 +838,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1045,6 +1045,63 @@
#define HOMING_FEEDRATE_XY (100*60) #define HOMING_FEEDRATE_XY (100*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/BQ/Hephestos/Configuration.h

@ -823,7 +823,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1030,6 +1030,63 @@
#define HOMING_FEEDRATE_XY 2000 #define HOMING_FEEDRATE_XY 2000
#define HOMING_FEEDRATE_Z 150 #define HOMING_FEEDRATE_Z 150
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h

@ -833,7 +833,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1040,6 +1040,63 @@
#define HOMING_FEEDRATE_XY (60*60) #define HOMING_FEEDRATE_XY (60*60)
#define HOMING_FEEDRATE_Z 120 #define HOMING_FEEDRATE_Z 120
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/BQ/WITBOX/Configuration.h

@ -823,7 +823,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1030,6 +1030,63 @@
#define HOMING_FEEDRATE_XY (120*60) #define HOMING_FEEDRATE_XY (120*60)
#define HOMING_FEEDRATE_Z 432 #define HOMING_FEEDRATE_Z 432
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Cartesio/Configuration.h

@ -831,7 +831,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1038,6 +1038,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (10*60) #define HOMING_FEEDRATE_Z (10*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Creality/CR-10/Configuration.h

@ -842,7 +842,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1049,6 +1049,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Felix/Configuration.h

@ -814,7 +814,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1021,6 +1021,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Felix/DUAL/Configuration.h

@ -814,7 +814,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1021,6 +1021,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h

@ -829,7 +829,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1036,6 +1036,63 @@
#define HOMING_FEEDRATE_XY (40*60) #define HOMING_FEEDRATE_XY (40*60)
#define HOMING_FEEDRATE_Z (55) #define HOMING_FEEDRATE_Z (55)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h

@ -847,7 +847,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1054,6 +1054,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h

@ -836,7 +836,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1043,6 +1043,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Malyan/M150/Configuration.h

@ -856,7 +856,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1067,6 +1067,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h

@ -836,7 +836,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1043,6 +1043,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h

@ -836,7 +836,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1043,6 +1043,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Mks/Sbase/Configuration.h

@ -833,7 +833,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1040,6 +1040,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/RigidBot/Configuration.h

@ -830,7 +830,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1037,6 +1037,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (15*60) #define HOMING_FEEDRATE_Z (15*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/SCARA/Configuration.h

@ -844,7 +844,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1051,6 +1051,63 @@
#define HOMING_FEEDRATE_XY (40*60) #define HOMING_FEEDRATE_XY (40*60)
#define HOMING_FEEDRATE_Z (10*60) #define HOMING_FEEDRATE_Z (10*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/STM32F10/Configuration.h

@ -835,7 +835,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1042,6 +1042,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Sanguinololu/Configuration.h

@ -863,7 +863,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1070,6 +1070,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (6*60) #define HOMING_FEEDRATE_Z (6*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/TinyBoy2/Configuration.h

@ -888,7 +888,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1095,6 +1095,63 @@
#define HOMING_FEEDRATE_XY (40*60) #define HOMING_FEEDRATE_XY (40*60)
#define HOMING_FEEDRATE_Z (3*60) #define HOMING_FEEDRATE_Z (3*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Velleman/K8200/Configuration.h

@ -862,7 +862,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1069,6 +1069,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Velleman/K8400/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (8*60) #define HOMING_FEEDRATE_Z (8*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (8*60) #define HOMING_FEEDRATE_Z (8*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/adafruit/ST7565/Configuration.h

@ -832,7 +832,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1039,6 +1039,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h

@ -962,7 +962,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1172,6 +1172,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (100*60) #define HOMING_FEEDRATE_Z (100*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h

@ -962,7 +962,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1166,6 +1166,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (45*60) #define HOMING_FEEDRATE_Z (45*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/generic/Configuration.h

@ -949,7 +949,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1160,6 +1160,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (200*60) #define HOMING_FEEDRATE_Z (200*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/kossel_mini/Configuration.h

@ -952,7 +952,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1163,6 +1163,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (200*60) #define HOMING_FEEDRATE_Z (200*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/kossel_pro/Configuration.h

@ -952,7 +952,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1163,6 +1163,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (200*60) #define HOMING_FEEDRATE_Z (200*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/delta/kossel_xl/Configuration.h

@ -961,7 +961,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1172,6 +1172,63 @@
// Delta only homes to Z // Delta only homes to Z
#define HOMING_FEEDRATE_Z (60*60) #define HOMING_FEEDRATE_Z (60*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h

@ -846,7 +846,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1053,6 +1053,63 @@
#define HOMING_FEEDRATE_XY (60*60) #define HOMING_FEEDRATE_XY (60*60)
#define HOMING_FEEDRATE_Z (14*60) #define HOMING_FEEDRATE_Z (14*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/makibox/Configuration.h

@ -835,7 +835,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1042,6 +1042,63 @@
#define HOMING_FEEDRATE_XY 1500 #define HOMING_FEEDRATE_XY 1500
#define HOMING_FEEDRATE_Z (2*60) #define HOMING_FEEDRATE_Z (2*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/tvrrug/Round2/Configuration.h

@ -827,7 +827,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1034,6 +1034,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

59
Marlin/src/config/examples/wt150/Configuration.h

@ -837,7 +837,7 @@
//=========================================================================== //===========================================================================
//=============================== Bed Leveling ============================== //=============================== Bed Leveling ==============================
//=========================================================================== //===========================================================================
// @section bedlevel // @section calibrate
/** /**
* Choose one of the options below to enable G29 Bed Leveling. The parameters * Choose one of the options below to enable G29 Bed Leveling. The parameters
@ -1044,6 +1044,63 @@
#define HOMING_FEEDRATE_XY (50*60) #define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60) #define HOMING_FEEDRATE_Z (4*60)
// @section calibrate
/**
* Bed Skew Compensation
*
* This feature corrects for misalignment in the XYZ axes.
*
* Take the following steps to get the bed skew in the XY plane:
* 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
* 2. For XY_DIAG_AC measure the diagonal A to C
* 3. For XY_DIAG_BD measure the diagonal B to D
* 4. For XY_SIDE_AD measure the edge A to D
*
* Marlin automatically computes skew factors from these measurements.
* Skew factors may also be computed and set manually:
*
* - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
* - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
*
* If desired, follow the same procedure for XZ and YZ.
* Use these diagrams for reference:
*
* Y Z Z
* ^ B-------C ^ B-------C ^ B-------C
* | / / | / / | / /
* | / / | / / | / /
* | A-------D | A-------D | A-------D
* +-------------->X +-------------->X +-------------->Y
* XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
*/
//#define SKEW_CORRECTION
#if ENABLED(SKEW_CORRECTION)
// Input all length measurements here:
#define XY_DIAG_AC 282.8427124746
#define XY_DIAG_BD 282.8427124746
#define XY_SIDE_AD 200
// Or, set the default skew factors directly here
// to override the above measurements:
#define XY_SKEW_FACTOR 0.0
//#define SKEW_CORRECTION_FOR_Z
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#define XZ_DIAG_AC 282.8427124746
#define XZ_DIAG_BD 282.8427124746
#define YZ_DIAG_AC 282.8427124746
#define YZ_DIAG_BD 282.8427124746
#define YZ_SIDE_AD 200
#define XZ_SKEW_FACTOR 0.0
#define YZ_SKEW_FACTOR 0.0
#endif
// Enable this option for M852 to set skew at runtime
//#define SKEW_CORRECTION_GCODE
#endif
//============================================================================= //=============================================================================
//============================= Additional Features =========================== //============================= Additional Features ===========================
//============================================================================= //=============================================================================

4
Marlin/src/core/language.h

@ -130,7 +130,6 @@
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: " #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: " #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: " #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
#define MSG_FILE_PRINTED "Done printing file" #define MSG_FILE_PRINTED "Done printing file"
#define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_BEGIN_FILE_LIST "Begin file list"
#define MSG_END_FILE_LIST "End file list" #define MSG_END_FILE_LIST "End file list"
@ -163,6 +162,9 @@
#define MSG_Z2_MAX "z2_max: " #define MSG_Z2_MAX "z2_max: "
#define MSG_Z_PROBE "z_probe: " #define MSG_Z_PROBE "z_probe: "
#define MSG_PROBE_Z_OFFSET "Probe Z Offset" #define MSG_PROBE_Z_OFFSET "Probe Z Offset"
#define MSG_SKEW_MIN "min_skew_factor: "
#define MSG_SKEW_MAX "max_skew_factor: "
#define MSG_SKEW_WARN "WARNING: Skew compensation disabled (outside MIN/MAX limits)"
#define MSG_FILAMENT_RUNOUT_SENSOR "filament: " #define MSG_FILAMENT_RUNOUT_SENSOR "filament: "
#define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)" #define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
#define MSG_ERR_M355_NONE "No case light" #define MSG_ERR_M355_NONE "No case light"

89
Marlin/src/gcode/calibrate/M852.cpp

@ -0,0 +1,89 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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/>.
*
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(SKEW_CORRECTION_GCODE)
#include "../gcode.h"
#include "../../module/planner.h"
/**
* M852: Get or set the machine skew factors. Reports current values with no arguments.
*
* S[xy_factor] - Alias for 'I'
* I[xy_factor] - New XY skew factor
* J[xz_factor] - New XZ skew factor
* K[yz_factor] - New YZ skew factor
*/
void GcodeSuite::M852() {
const bool ijk = parser.seen('I') || parser.seen('S')
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|| parser.seen('J') || parser.seen('K')
#endif
;
bool badval = false;
if (parser.seen('I') || parser.seen('S')) {
const float value = parser.value_linear_units();
if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
planner.xy_skew_factor = value;
else
badval = true;
}
#if ENABLED(SKEW_CORRECTION_FOR_Z)
if (parser.seen('J')) {
const float value = parser.value_linear_units();
if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
planner.xz_skew_factor = value;
else
badval = true;
}
if (parser.seen('K')) {
const float value = parser.value_linear_units();
if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
planner.yz_skew_factor = value;
else
badval = true;
}
#endif
if (badval)
SERIAL_ECHOLNPGM(MSG_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " MSG_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
if (!ijk) {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR(MSG_SKEW_FACTOR " XY: ", planner.xy_skew_factor);
#if ENABLED(SKEW_CORRECTION_FOR_Z)
SERIAL_ECHOPAIR(" XZ: ", planner.xz_skew_factor);
SERIAL_ECHOLNPAIR(" YZ: ", planner.yz_skew_factor);
#else
SERIAL_EOL();
#endif
}
}
#endif // SKEW_CORRECTION_GCODE

6
Marlin/src/gcode/gcode.cpp

@ -622,6 +622,12 @@ void GcodeSuite::process_parsed_command() {
break; break;
#endif // HAS_BED_PROBE #endif // HAS_BED_PROBE
#if ENABLED(SKEW_CORRECTION_GCODE)
case 852: // M852: Set Skew factors
M852();
break;
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
case 600: // M600: Pause for filament change case 600: // M600: Pause for filament change
M600(); M600();

5
Marlin/src/gcode/gcode.h

@ -201,6 +201,7 @@
* M666 - Set delta endstop adjustment. (Requires DELTA) * M666 - Set delta endstop adjustment. (Requires DELTA)
* M605 - Set dual x-carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE) * M605 - Set dual x-carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
* M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.) * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
* M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
* M860 - Report the position of position encoder modules. * M860 - Report the position of position encoder modules.
* M861 - Report the status of position encoder modules. * M861 - Report the status of position encoder modules.
* M862 - Perform an axis continuity test for position encoder modules. * M862 - Perform an axis continuity test for position encoder modules.
@ -705,6 +706,10 @@ private:
static void M851(); static void M851();
#endif #endif
#if ENABLED(SKEW_CORRECTION_GCODE)
static void M852();
#endif
#if ENABLED(I2C_POSITION_ENCODERS) #if ENABLED(I2C_POSITION_ENCODERS)
FORCE_INLINE static void M860() { I2CPEM.M860(); } FORCE_INLINE static void M860() { I2CPEM.M860(); }
FORCE_INLINE static void M861() { I2CPEM.M861(); } FORCE_INLINE static void M861() { I2CPEM.M861(); }

43
Marlin/src/inc/Conditionals_post.h

@ -888,6 +888,49 @@
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 #define Z_PROBE_OFFSET_FROM_EXTRUDER 0
#endif #endif
/**
* XYZ Bed Skew Correction
*/
#if ENABLED(SKEW_CORRECTION)
#define SKEW_FACTOR_MIN -1
#define SKEW_FACTOR_MAX 1
#define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
#define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
#ifndef XY_SKEW_FACTOR
constexpr float XY_SKEW_FACTOR = (
#if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
_SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
#else
0.0
#endif
);
#endif
#ifndef XZ_SKEW_FACTOR
#if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
#define XZ_SIDE_AD XY_SIDE_AD
#endif
constexpr float XZ_SKEW_FACTOR = (
#if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
_SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
#else
0.0
#endif
);
#endif
#ifndef YZ_SKEW_FACTOR
constexpr float YZ_SKEW_FACTOR = (
#if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
_SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
#else
0.0
#endif
);
#endif
#endif // SKEW_CORRECTION
/** /**
* Heater & Fan Pausing * Heater & Fan Pausing
*/ */

14
Marlin/src/inc/SanityCheck.h

@ -1483,4 +1483,18 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m
#error "LED_CONTROL_MENU requires an LCD controller." #error "LED_CONTROL_MENU requires an LCD controller."
#endif #endif
#if ENABLED(SKEW_CORRECTION)
#if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
#error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
#endif
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
#error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
#endif
#if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
#error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
#endif
#endif
#endif
#endif // _SANITYCHECK_H_ #endif // _SANITYCHECK_H_

3
Marlin/src/lcd/language/language_en.h

@ -698,6 +698,9 @@
#ifndef MSG_ZPROBE_OUT #ifndef MSG_ZPROBE_OUT
#define MSG_ZPROBE_OUT _UxGT("Z probe out. bed") #define MSG_ZPROBE_OUT _UxGT("Z probe out. bed")
#endif #endif
#ifndef MSG_SKEW_FACTOR
#define MSG_SKEW_FACTOR _UxGT("Skew Factor")
#endif
#ifndef MSG_BLTOUCH #ifndef MSG_BLTOUCH
#define MSG_BLTOUCH _UxGT("BLTouch") #define MSG_BLTOUCH _UxGT("BLTouch")
#endif #endif

73
Marlin/src/module/configuration_store.cpp

@ -36,13 +36,13 @@
* *
*/ */
#define EEPROM_VERSION "V45" #define EEPROM_VERSION "V46"
// Change EEPROM version if these are changed: // Change EEPROM version if these are changed:
#define EEPROM_OFFSET 100 #define EEPROM_OFFSET 100
/** /**
* V45 EEPROM Layout: * V46 EEPROM Layout:
* *
* 100 Version (char x4) * 100 Version (char x4)
* 104 EEPROM CRC16 (uint16_t) * 104 EEPROM CRC16 (uint16_t)
@ -166,8 +166,13 @@
* CNC_COORDINATE_SYSTEMS 108 bytes * CNC_COORDINATE_SYSTEMS 108 bytes
* 602 G54-G59.3 coordinate_system (float x 27) * 602 G54-G59.3 coordinate_system (float x 27)
* *
* 710 Minimum end-point * SKEW_CORRECTION: 12 bytes
* 2239 (710 + 208 + 36 + 9 + 288 + 988) Maximum end-point * 710 M852 I planner.xy_skew_factor (float)
* 714 M852 J planner.xz_skew_factor (float)
* 718 M852 K planner.yz_skew_factor (float)
*
* 722 Minimum end-point
* 2251 (722 + 208 + 36 + 9 + 288 + 988) Maximum end-point
* *
* ======================================================================== * ========================================================================
* meshes_begin (between max and min end-point, directly above) * meshes_begin (between max and min end-point, directly above)
@ -633,6 +638,10 @@ void MarlinSettings::postprocess() {
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32); for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32);
#endif #endif
//
// CNC Coordinate Systems
//
#if ENABLED(CNC_COORDINATE_SYSTEMS) #if ENABLED(CNC_COORDINATE_SYSTEMS)
EEPROM_WRITE(coordinate_system); // 27 floats EEPROM_WRITE(coordinate_system); // 27 floats
#else #else
@ -640,6 +649,19 @@ void MarlinSettings::postprocess() {
for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy); for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy);
#endif #endif
//
// Skew correction factors
//
#if ENABLED(SKEW_CORRECTION)
EEPROM_WRITE(planner.xy_skew_factor);
EEPROM_WRITE(planner.xz_skew_factor);
EEPROM_WRITE(planner.yz_skew_factor);
#else
dummy = 0.0f;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
#endif
if (!eeprom_error) { if (!eeprom_error) {
#if ENABLED(EEPROM_CHITCHAT) #if ENABLED(EEPROM_CHITCHAT)
const int eeprom_size = eeprom_index; const int eeprom_size = eeprom_index;
@ -1078,6 +1100,23 @@ void MarlinSettings::postprocess() {
for (uint8_t q = 27; q--;) EEPROM_READ(dummy); for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
#endif #endif
//
// Skew correction factors
//
#if ENABLED(SKEW_CORRECTION_GCODE)
EEPROM_READ(planner.xy_skew_factor);
#if ENABLED(SKEW_CORRECTION_FOR_Z)
EEPROM_READ(planner.xz_skew_factor);
EEPROM_READ(planner.yz_skew_factor);
#else
EEPROM_READ(dummy);
EEPROM_READ(dummy);
#endif
#else
for (uint8_t q = 3; q--;) EEPROM_READ(dummy);
#endif
if (working_crc == stored_crc) { if (working_crc == stored_crc) {
postprocess(); postprocess();
#if ENABLED(EEPROM_CHITCHAT) #if ENABLED(EEPROM_CHITCHAT)
@ -1463,6 +1502,14 @@ void MarlinSettings::reset() {
ubl.reset(); ubl.reset();
#endif #endif
#if ENABLED(SKEW_CORRECTION_GCODE)
planner.xy_skew_factor = XY_SKEW_FACTOR;
#if ENABLED(SKEW_CORRECTION_FOR_Z)
planner.xz_skew_factor = XZ_SKEW_FACTOR;
planner.yz_skew_factor = YZ_SKEW_FACTOR;
#endif
#endif
postprocess(); postprocess();
#if ENABLED(EEPROM_CHITCHAT) #if ENABLED(EEPROM_CHITCHAT)
@ -1887,6 +1934,24 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPAIR(" M851 Z", LINEAR_UNIT(zprobe_zoffset)); SERIAL_ECHOLNPAIR(" M851 Z", LINEAR_UNIT(zprobe_zoffset));
#endif #endif
/**
* Bed Skew Correction
*/
#if ENABLED(SKEW_CORRECTION_GCODE)
if (!forReplay) {
CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Skew Factor: ");
}
CONFIG_ECHO_START;
#if ENABLED(SKEW_CORRECTION_FOR_Z)
SERIAL_ECHOPAIR(" M852 I", LINEAR_UNIT(planner.xy_skew_factor));
SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
#else
SERIAL_ECHOLNPAIR(" M852 S", LINEAR_UNIT(planner.xy_skew_factor));
#endif
#endif
/** /**
* TMC2130 stepper driver current * TMC2130 stepper driver current
*/ */

115
Marlin/src/module/planner.cpp

@ -135,6 +135,20 @@ float Planner::min_feedrate_mm_s,
#endif #endif
#endif #endif
#if ENABLED(SKEW_CORRECTION)
#if ENABLED(SKEW_CORRECTION_GCODE)
// Initialized by settings.load()
float Planner::xy_skew_factor;
#if ENABLED(SKEW_CORRECTION_FOR_Z)
float Planner::xz_skew_factor, Planner::yz_skew_factor;
#else
constexpr float Planner::xz_skew_factor, Planner::yz_skew_factor;
#endif
#else
constexpr float Planner::xy_skew_factor, Planner::xz_skew_factor, Planner::yz_skew_factor;
#endif
#endif
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
float Planner::autotemp_max = 250, float Planner::autotemp_max = 250,
Planner::autotemp_min = 210, Planner::autotemp_min = 210,
@ -565,6 +579,19 @@ void Planner::calculate_volumetric_multipliers() {
*/ */
void Planner::apply_leveling(float &rx, float &ry, float &rz) { void Planner::apply_leveling(float &rx, float &ry, float &rz) {
#if ENABLED(SKEW_CORRECTION)
if (WITHIN(rx, X_MIN_POS + 1, X_MAX_POS) && WITHIN(ry, Y_MIN_POS + 1, Y_MAX_POS)) {
const float tempry = ry - (rz * planner.yz_skew_factor),
temprx = rx - (ry * planner.xy_skew_factor) - (rz * (planner.xz_skew_factor - (planner.xy_skew_factor * planner.yz_skew_factor)));
if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
rx = temprx;
ry = tempry;
}
else
SERIAL_ECHOLN(MSG_SKEW_WARN);
}
#endif
if (!leveling_active) return; if (!leveling_active) return;
#if ABL_PLANAR #if ABL_PLANAR
@ -611,45 +638,56 @@ void Planner::calculate_volumetric_multipliers() {
void Planner::unapply_leveling(float raw[XYZ]) { void Planner::unapply_leveling(float raw[XYZ]) {
if (!leveling_active) return; #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
#else
constexpr float fade_scaling_factor = 1.0;
#endif
#if ABL_PLANAR if (leveling_active && fade_scaling_factor) {
matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); #if ABL_PLANAR
float dx = raw[X_AXIS] - (X_TILT_FULCRUM), matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]); float dx = raw[X_AXIS] - (X_TILT_FULCRUM),
dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
raw[X_AXIS] = dx + X_TILT_FULCRUM; apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]);
raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
#else raw[X_AXIS] = dx + X_TILT_FULCRUM;
raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #else // !ABL_PLANAR
const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
if (!fade_scaling_factor) return;
#elif HAS_MESH
constexpr float fade_scaling_factor = 1.0;
#endif
raw[Z_AXIS] -= ( raw[Z_AXIS] -= (
#if ENABLED(AUTO_BED_LEVELING_UBL) #if ENABLED(AUTO_BED_LEVELING_UBL)
ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor
#elif ENABLED(MESH_BED_LEVELING) #elif ENABLED(MESH_BED_LEVELING)
mbl.get_z(raw[X_AXIS], raw[Y_AXIS] mbl.get_z(raw[X_AXIS], raw[Y_AXIS]
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
, fade_scaling_factor , fade_scaling_factor
#endif #endif
) )
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR) #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
bilinear_z_offset(raw) * fade_scaling_factor bilinear_z_offset(raw) * fade_scaling_factor
#else #else
0 0
#endif #endif
); );
#endif // !ABL_PLANAR
}
#if ENABLED(SKEW_CORRECTION)
if (WITHIN(raw[X_AXIS], X_MIN_POS, X_MAX_POS) && WITHIN(raw[Y_AXIS], Y_MIN_POS, Y_MAX_POS)) {
const float temprx = raw[X_AXIS] + raw[Y_AXIS] * planner.xy_skew_factor + raw[Z_AXIS] * planner.xz_skew_factor,
tempry = raw[Y_AXIS] + raw[Z_AXIS] * planner.yz_skew_factor;
if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
raw[X_AXIS] = temprx;
raw[Y_AXIS] = tempry;
}
}
#endif #endif
} }
@ -658,13 +696,13 @@ void Planner::calculate_volumetric_multipliers() {
/** /**
* Planner::_buffer_line * Planner::_buffer_line
* *
* Add a new linear movement to the buffer. * Add a new linear movement to the buffer in axis units.
* *
* Leveling and kinematics should be applied ahead of calling this. * Leveling and kinematics should be applied ahead of calling this.
* *
* a,b,c,e - target positions in mm or degrees * a,b,c,e - target positions in mm and/or degrees
* fr_mm_s - (target) speed of the move * fr_mm_s - (target) speed of the move
* extruder - target extruder * extruder - target extruder
*/ */
void Planner::_buffer_line(const float &a, const float &b, const float &c, const float &e, float fr_mm_s, const uint8_t extruder) { void Planner::_buffer_line(const float &a, const float &b, const float &c, const float &e, float fr_mm_s, const uint8_t extruder) {
@ -713,6 +751,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
SERIAL_EOL(); SERIAL_EOL();
//*/ //*/
// DRYRUN ignores all temperature constraints and assures that the extruder is instantly satisfied
if (DEBUGGING(DRYRUN))
position[E_AXIS] = target[E_AXIS];
int32_t de = target[E_AXIS] - position[E_AXIS]; int32_t de = target[E_AXIS] - position[E_AXIS];
#if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE) #if ENABLED(PREVENT_COLD_EXTRUSION) || ENABLED(PREVENT_LENGTHY_EXTRUDE)
@ -736,6 +778,10 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
} }
#endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE #endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE
#if ENABLED(LIN_ADVANCE)
float de_float = de * steps_to_mm[E_AXIS_N];
#endif
// Compute direction bit-mask for this block // Compute direction bit-mask for this block
uint8_t dm = 0; uint8_t dm = 0;
#if CORE_IS_XY #if CORE_IS_XY
@ -1332,6 +1378,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
previous_safe_speed = safe_speed; previous_safe_speed = safe_speed;
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
/** /**
* *
* Use LIN_ADVANCE for blocks if all these are true: * Use LIN_ADVANCE for blocks if all these are true:

17
Marlin/src/module/planner.h

@ -180,6 +180,23 @@ class Planner {
static float extruder_advance_k, advance_ed_ratio; static float extruder_advance_k, advance_ed_ratio;
#endif #endif
#if ENABLED(SKEW_CORRECTION)
#if ENABLED(SKEW_CORRECTION_GCODE)
static float xy_skew_factor;
#else
static constexpr float xy_skew_factor = XY_SKEW_FACTOR;
#endif
#if ENABLED(SKEW_CORRECTION_FOR_Z)
#if ENABLED(SKEW_CORRECTION_GCODE)
static float xz_skew_factor, yz_skew_factor;
#else
static constexpr float xz_skew_factor = XZ_SKEW_FACTOR, yz_skew_factor = YZ_SKEW_FACTOR;
#endif
#else
static constexpr float xz_skew_factor = 0, yz_skew_factor = 0;
#endif
#endif
private: private:
/** /**

2
Marlin/src/module/temperature.cpp

@ -1357,7 +1357,7 @@ void Temperature::init() {
millis_t Temperature::thermal_runaway_bed_timer; millis_t Temperature::thermal_runaway_bed_timer;
#endif #endif
void Temperature::thermal_runaway_protection(Temperature::TRState* state, millis_t* timer, float current, float target, int heater_id, int period_seconds, int hysteresis_degc) { void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
static float tr_target_temperature[HOTENDS + 1] = { 0.0 }; static float tr_target_temperature[HOTENDS + 1] = { 0.0 };

2
Marlin/src/module/temperature.h

@ -574,7 +574,7 @@ class Temperature {
typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate; typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
static void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc); static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
#if ENABLED(THERMAL_PROTECTION_HOTENDS) #if ENABLED(THERMAL_PROTECTION_HOTENDS)
static TRState thermal_runaway_state_machine[HOTENDS]; static TRState thermal_runaway_state_machine[HOTENDS];

Loading…
Cancel
Save