Browse Source

G34 Auto-align multi-stepper Z axis (#11302)

TheLongAndOnly 5 years ago
parent
commit
5536228359
72 changed files with 1434 additions and 29 deletions
  1. 18
    0
      Marlin/Configuration_adv.h
  2. 18
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 18
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 18
    0
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  5. 18
    0
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  6. 18
    1
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  7. 18
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  8. 18
    1
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  9. 18
    0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  10. 18
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  11. 18
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  12. 18
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  13. 18
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  14. 18
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  15. 18
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  16. 18
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  17. 18
    0
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  18. 18
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  19. 18
    0
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  20. 18
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  21. 18
    0
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  22. 18
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  23. 18
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  24. 18
    0
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  25. 18
    0
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  26. 18
    0
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  27. 18
    0
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  28. 18
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  29. 18
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  30. 18
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  31. 18
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  32. 18
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  33. 18
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  34. 18
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  35. 18
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  36. 18
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  37. 18
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  38. 18
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  39. 18
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  40. 18
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  41. 18
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  42. 18
    0
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  43. 18
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  44. 18
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  45. 18
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  46. 18
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  47. 18
    0
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  48. 18
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  49. 18
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  50. 18
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  51. 18
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  52. 18
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  53. 18
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  54. 18
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  55. 18
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  56. 18
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  57. 18
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  58. 10
    0
      Marlin/src/feature/I2CPositionEncoder.cpp
  59. 6
    0
      Marlin/src/feature/I2CPositionEncoder.h
  60. 286
    0
      Marlin/src/gcode/calibrate/G34_M422.cpp
  61. 9
    1
      Marlin/src/gcode/gcode.cpp
  62. 7
    0
      Marlin/src/gcode/gcode.h
  63. 8
    0
      Marlin/src/inc/Conditionals_post.h
  64. 13
    0
      Marlin/src/inc/SanityCheck.h
  65. 1
    0
      Marlin/src/lcd/language/language_de.h
  66. 3
    0
      Marlin/src/lcd/language/language_en.h
  67. 7
    0
      Marlin/src/lcd/menu/menu_motion.cpp
  68. 29
    11
      Marlin/src/module/motion.cpp
  69. 2
    0
      Marlin/src/module/motion.h
  70. 17
    5
      Marlin/src/module/stepper.cpp
  71. 6
    6
      Marlin/src/module/stepper.h
  72. 4
    4
      buildroot/share/tests/DUE_tests

+ 18
- 0
Marlin/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/default/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Anet/A2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 1
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

360
  * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
360
  * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
361
  * By default the X2 stepper is assigned to the first unused E plug on the board.
361
  * By default the X2 stepper is assigned to the first unused E plug on the board.
362
  */
362
  */
363
-//#define DUAL_X_CARRIAGE
364
 #if ENABLED(DUAL_X_CARRIAGE)
363
 #if ENABLED(DUAL_X_CARRIAGE)
365
   #define X1_MIN_POS X_MIN_POS  // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
364
   #define X1_MIN_POS X_MIN_POS  // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
366
   #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
365
   #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
409
 // Enable this if X or Y can't home without homing the other axis first.
408
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
409
 //#define CODEPENDENT_XY_HOMING
411
 
410
 
411
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
412
+//#define Z_STEPPER_AUTO_ALIGN
413
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
414
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
415
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
416
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
417
+  // Set number of iterations to align
418
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
419
+  // Enable to restore leveling setup after operation
420
+  #define RESTORE_LEVELING_AFTER_G34
421
+  // Use the amplification factor to de-/increase correction step.
422
+  // In case the stepper (spindle) position is further out than the test point
423
+  // Use a value > 1. NOTE: This may cause instability
424
+  #define Z_STEPPER_ALIGN_AMP 1.0
425
+  // Stop criterion. If the accuracy is better than this stop iterating early
426
+  #define Z_STEPPER_ALIGN_ACC 0.02
427
+#endif
428
+
412
 // @section machine
429
 // @section machine
413
 
430
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
431
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 1
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

360
  * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
360
  * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
361
  * By default the X2 stepper is assigned to the first unused E plug on the board.
361
  * By default the X2 stepper is assigned to the first unused E plug on the board.
362
  */
362
  */
363
-//#define DUAL_X_CARRIAGE
364
 #if ENABLED(DUAL_X_CARRIAGE)
363
 #if ENABLED(DUAL_X_CARRIAGE)
365
   #define X1_MIN_POS X_MIN_POS  // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
364
   #define X1_MIN_POS X_MIN_POS  // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
366
   #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
365
   #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
409
 // Enable this if X or Y can't home without homing the other axis first.
408
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
409
 //#define CODEPENDENT_XY_HOMING
411
 
410
 
411
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
412
+//#define Z_STEPPER_AUTO_ALIGN
413
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
414
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
415
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
416
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
417
+  // Set number of iterations to align
418
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
419
+  // Enable to restore leveling setup after operation
420
+  #define RESTORE_LEVELING_AFTER_G34
421
+  // Use the amplification factor to de-/increase correction step.
422
+  // In case the stepper (spindle) position is further out than the test point
423
+  // Use a value > 1. NOTE: This may cause instability
424
+  #define Z_STEPPER_ALIGN_AMP 1.0
425
+  // Stop criterion. If the accuracy is better than this stop iterating early
426
+  #define Z_STEPPER_ALIGN_ACC 0.02
427
+#endif
428
+
412
 // @section machine
429
 // @section machine
413
 
430
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
431
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Einstart-S/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

413
 // Enable this if X or Y can't home without homing the other axis first.
413
 // Enable this if X or Y can't home without homing the other axis first.
414
 //#define CODEPENDENT_XY_HOMING
414
 //#define CODEPENDENT_XY_HOMING
415
 
415
 
416
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
417
+//#define Z_STEPPER_AUTO_ALIGN
418
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
419
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
420
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
421
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
422
+  // Set number of iterations to align
423
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
424
+  // Enable to restore leveling setup after operation
425
+  #define RESTORE_LEVELING_AFTER_G34
426
+  // Use the amplification factor to de-/increase correction step.
427
+  // In case the stepper (spindle) position is further out than the test point
428
+  // Use a value > 1. NOTE: This may cause instability
429
+  #define Z_STEPPER_ALIGN_AMP 1.0
430
+  // Stop criterion. If the accuracy is better than this stop iterating early
431
+  #define Z_STEPPER_ALIGN_ACC 0.02
432
+#endif
433
+
416
 // @section machine
434
 // @section machine
417
 
435
 
418
 #define AXIS_RELATIVE_MODES {false, false, false, false}
436
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

414
 // Enable this if X or Y can't home without homing the other axis first.
414
 // Enable this if X or Y can't home without homing the other axis first.
415
 //#define CODEPENDENT_XY_HOMING
415
 //#define CODEPENDENT_XY_HOMING
416
 
416
 
417
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
418
+//#define Z_STEPPER_AUTO_ALIGN
419
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
420
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
421
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
422
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
423
+  // Set number of iterations to align
424
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
425
+  // Enable to restore leveling setup after operation
426
+  #define RESTORE_LEVELING_AFTER_G34
427
+  // Use the amplification factor to de-/increase correction step.
428
+  // In case the stepper (spindle) position is further out than the test point
429
+  // Use a value > 1. NOTE: This may cause instability
430
+  #define Z_STEPPER_ALIGN_AMP 1.0
431
+  // Stop criterion. If the accuracy is better than this stop iterating early
432
+  #define Z_STEPPER_ALIGN_ACC 0.02
433
+#endif
434
+
417
 // @section machine
435
 // @section machine
418
 
436
 
419
 #define AXIS_RELATIVE_MODES {false, false, false, false}
437
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

422
 // Enable this if X or Y can't home without homing the other axis first.
422
 // Enable this if X or Y can't home without homing the other axis first.
423
 //#define CODEPENDENT_XY_HOMING
423
 //#define CODEPENDENT_XY_HOMING
424
 
424
 
425
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
426
+//#define Z_STEPPER_AUTO_ALIGN
427
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
428
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
429
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
430
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
431
+  // Set number of iterations to align
432
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
433
+  // Enable to restore leveling setup after operation
434
+  #define RESTORE_LEVELING_AFTER_G34
435
+  // Use the amplification factor to de-/increase correction step.
436
+  // In case the stepper (spindle) position is further out than the test point
437
+  // Use a value > 1. NOTE: This may cause instability
438
+  #define Z_STEPPER_ALIGN_AMP 1.0
439
+  // Stop criterion. If the accuracy is better than this stop iterating early
440
+  #define Z_STEPPER_ALIGN_ACC 0.02
441
+#endif
442
+
425
 // @section machine
443
 // @section machine
426
 
444
 
427
 #define AXIS_RELATIVE_MODES {false, false, false, false}
445
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 18
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h View File

409
 // Enable this if X or Y can't home without homing the other axis first.
409
 // Enable this if X or Y can't home without homing the other axis first.
410
 //#define CODEPENDENT_XY_HOMING
410
 //#define CODEPENDENT_XY_HOMING
411
 
411
 
412
+// Automatic alignment of Z steppers for multi-Z-stepper and a probe
413
+//#define Z_STEPPER_AUTO_ALIGN
414
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+  // Define probe X and Y positions for Z1, Z2 [, Z3]
416
+  #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
417
+  #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
418
+  // Set number of iterations to align
419
+  #define Z_STEPPER_ALIGN_ITERATIONS 3
420
+  // Enable to restore leveling setup after operation
421
+  #define RESTORE_LEVELING_AFTER_G34
422
+  // Use the amplification factor to de-/increase correction step.
423
+  // In case the stepper (spindle) position is further out than the test point
424
+  // Use a value > 1. NOTE: This may cause instability
425
+  #define Z_STEPPER_ALIGN_AMP 1.0
426
+  // Stop criterion. If the accuracy is better than this stop iterating early
427
+  #define Z_STEPPER_ALIGN_ACC 0.02
428
+#endif
429
+
412
 // @section machine
430
 // @section machine
413
 
431
 
414
 #define AXIS_RELATIVE_MODES {false, false, false, false}
432
 #define AXIS_RELATIVE_MODES {false, false, false, false}

+ 10
- 0
Marlin/src/feature/I2CPositionEncoder.cpp View File

232
   }
232
   }
233
 }
233
 }
234
 
234
 
235
+void I2CPositionEncoder::set_unhomed() {
236
+  zeroOffset = 0;
237
+  homed = trusted = false;
238
+
239
+  #ifdef I2CPE_DEBUG
240
+    SERIAL_ECHO(axis_codes[encoderAxis]);
241
+    SERIAL_ECHOLNPGM(" axis encoder unhomed.");
242
+  #endif
243
+}
244
+
235
 bool I2CPositionEncoder::passes_test(const bool report) {
245
 bool I2CPositionEncoder::passes_test(const bool report) {
236
   if (report) {
246
   if (report) {
237
     if (H != I2CPE_MAG_SIG_GOOD) SERIAL_ECHOPGM("Warning. ");
247
     if (H != I2CPE_MAG_SIG_GOOD) SERIAL_ECHOPGM("Warning. ");

+ 6
- 0
Marlin/src/feature/I2CPositionEncoder.h View File

146
     void update();
146
     void update();
147
 
147
 
148
     void set_homed();
148
     void set_homed();
149
+    void set_unhomed();
149
 
150
 
150
     int32_t get_raw_count();
151
     int32_t get_raw_count();
151
 
152
 
230
         if (encoders[i].get_axis() == axis) encoders[i].set_homed();
231
         if (encoders[i].get_axis() == axis) encoders[i].set_homed();
231
     }
232
     }
232
 
233
 
234
+    static void unhomed(const AxisEnum axis) {
235
+      LOOP_PE(i)
236
+        if (encoders[i].get_axis() == axis) encoders[i].set_unhomed();
237
+    }
238
+
233
     static void report_position(const int8_t idx, const bool units, const bool noOffset);
239
     static void report_position(const int8_t idx, const bool units, const bool noOffset);
234
 
240
 
235
     static void report_status(const int8_t idx) {
241
     static void report_status(const int8_t idx) {

+ 286
- 0
Marlin/src/gcode/calibrate/G34_M422.cpp View File

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../inc/MarlinConfig.h"
24
+
25
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
26
+
27
+#include "../gcode.h"
28
+#include "../../module/delta.h"
29
+#include "../../module/motion.h"
30
+#include "../../module/stepper.h"
31
+#include "../../module/endstops.h"
32
+
33
+#if HOTENDS > 1
34
+  #include "../../module/tool_change.h"
35
+#endif
36
+
37
+#if HAS_BED_PROBE
38
+  #include "../../module/probe.h"
39
+#endif
40
+
41
+#if HAS_LEVELING
42
+  #include "../../feature/bedlevel/bedlevel.h"
43
+#endif
44
+
45
+float z_auto_align_xpos[Z_STEPPER_COUNT] = Z_STEPPER_ALIGN_X,
46
+      z_auto_align_ypos[Z_STEPPER_COUNT] = Z_STEPPER_ALIGN_Y;
47
+
48
+inline void set_all_z_lock(const bool lock) {
49
+  stepper.set_z_lock(lock);
50
+  stepper.set_z2_lock(lock);
51
+  #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
52
+    stepper.set_z3_lock(lock);
53
+  #endif
54
+}
55
+
56
+/**
57
+ * G34: Z-Stepper automatic alignment
58
+ *
59
+ * Parameters: I<iterations> T<accuracy> A<amplification>
60
+ */
61
+void GcodeSuite::G34() {
62
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
63
+    if (DEBUGGING(LEVELING)) {
64
+      SERIAL_ECHOLNPGM(">>> G34");
65
+      log_machine_info();
66
+    }
67
+  #endif
68
+
69
+  do { // break out on error
70
+
71
+    if (!TEST(axis_known_position, X_AXIS) || !TEST(axis_known_position, Y_AXIS)) {
72
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
73
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> XY homing required.");
74
+      #endif
75
+      break;
76
+    }
77
+
78
+    const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS);
79
+    if (!WITHIN(z_auto_align_iterations, 1, 30)) {
80
+      SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30).");
81
+      break;
82
+    }
83
+
84
+    const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC);
85
+    if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) {
86
+      SERIAL_ECHOLNPGM("?(T)arget accuracy out of bounds (0.01-1.0).");
87
+      break;
88
+    }
89
+
90
+    const float z_auto_align_amplification = parser.floatval('A', Z_STEPPER_ALIGN_AMP);
91
+    if (!WITHIN(z_auto_align_amplification, 0.5f, 2.0f)) {
92
+      SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0).");
93
+      break;
94
+    }
95
+
96
+    // Wait for planner moves to finish!
97
+    planner.synchronize();
98
+
99
+    // Disable the leveling matrix before auto-aligning
100
+    #if HAS_LEVELING
101
+      #if ENABLED(RESTORE_LEVELING_AFTER_G34)
102
+        const bool leveling_was_active = planner.leveling_active;
103
+      #endif
104
+      set_bed_leveling_enabled(false);
105
+    #endif
106
+
107
+    #if ENABLED(CNC_WORKSPACE_PLANES)
108
+      workspace_plane = PLANE_XY;
109
+    #endif
110
+
111
+    #if ENABLED(BLTOUCH)
112
+      bltouch_command(BLTOUCH_RESET);
113
+      set_bltouch_deployed(false);
114
+    #endif
115
+
116
+    // Always home with tool 0 active
117
+    #if HOTENDS > 1
118
+      const uint8_t old_tool_index = active_extruder;
119
+      tool_change(0, 0, true);
120
+    #endif
121
+
122
+    #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
123
+      extruder_duplication_enabled = false;
124
+    #endif
125
+
126
+    // Remember corrections to determine errors on each iteration
127
+    float last_z_align_move[Z_STEPPER_COUNT] = ARRAY_N(Z_STEPPER_COUNT, 10000.0f, 10000.0f, 10000.0f),
128
+          z_measured[Z_STEPPER_COUNT] = { 0 };
129
+    bool err_break = false;
130
+    for (uint8_t iteration = 0; iteration < z_auto_align_iterations; ++iteration) {
131
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
132
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> probing all positions.");
133
+      #endif
134
+
135
+      // Reset minimum value
136
+      float z_measured_min = 100000.0f;
137
+      // For each iteration go through all probe positions (one per Z-Stepper)
138
+      for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) {
139
+        // Probe a Z height for each stepper
140
+        z_measured[zstepper] = probe_pt(z_auto_align_xpos[zstepper], z_auto_align_ypos[zstepper], PROBE_PT_RAISE, false);
141
+
142
+        // Stop on error
143
+        if (isnan(z_measured[zstepper])) {
144
+          #if ENABLED(DEBUG_LEVELING_FEATURE)
145
+            if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> PROBING FAILED!");
146
+          #endif
147
+          err_break = true;
148
+          break;
149
+        }
150
+
151
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
152
+          if (DEBUGGING(LEVELING)) {
153
+            SERIAL_ECHOPAIR("> Z", int(zstepper + 1));
154
+            SERIAL_ECHOLNPAIR(" measured position is ", z_measured[zstepper]);
155
+          }
156
+        #endif
157
+
158
+        // Remember the maximum position to calculate the correction
159
+        z_measured_min = MIN(z_measured_min, z_measured[zstepper]);
160
+      }
161
+
162
+      if (err_break) break;
163
+
164
+      // Remember the current z position to return to
165
+      float z_original_position = current_position[Z_AXIS];
166
+
167
+      // Iterations can stop early if all corrections are below required accuracy
168
+      bool success_break = true;
169
+      // Correct stepper offsets and re-iterate
170
+      for (uint8_t zstepper = 0; zstepper < Z_STEPPER_COUNT; ++zstepper) {
171
+        stepper.set_separate_multi_axis(true);
172
+        set_all_z_lock(true); // Steppers will be enabled separately
173
+
174
+        // Calculate current stepper move
175
+        const float z_align_move = z_measured[zstepper] - z_measured_min,
176
+                    z_align_abs = ABS(z_align_move);
177
+
178
+        // Check for lost accuracy compared to last move
179
+        if (last_z_align_move[zstepper] < z_align_abs - 1.0) {
180
+          // Stop here
181
+          #if ENABLED(DEBUG_LEVELING_FEATURE)
182
+            if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> detected decreasing accuracy.");
183
+          #endif
184
+          err_break = true;
185
+          break;
186
+        }
187
+        else
188
+          last_z_align_move[zstepper] = z_align_abs;
189
+
190
+        // Only stop early if all measured points achieve accuracy target
191
+        if (z_align_abs > z_auto_align_accuracy) success_break = false;
192
+
193
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
194
+          if (DEBUGGING(LEVELING)) {
195
+            SERIAL_ECHOPAIR("> Z", int(zstepper + 1));
196
+            SERIAL_ECHOLNPAIR(" corrected by ", z_align_move);
197
+          }
198
+        #endif
199
+
200
+        switch (zstepper) {
201
+          case 0: stepper.set_z_lock(false); break;
202
+          case 1: stepper.set_z2_lock(false); break;
203
+          #if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
204
+            case 2: stepper.set_z3_lock(false); break;
205
+          #endif
206
+        }
207
+
208
+        // This will lose home position and require re-homing
209
+        do_blocking_move_to_z(z_auto_align_amplification * z_align_move + current_position[Z_AXIS]);
210
+      }
211
+
212
+      if (err_break) break;
213
+
214
+      // Move Z back to previous position
215
+      set_all_z_lock(true);
216
+      do_blocking_move_to_z(z_original_position);
217
+      set_all_z_lock(false);
218
+
219
+      stepper.set_separate_multi_axis(false);
220
+
221
+      if (success_break) {
222
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
223
+          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> achieved target accuracy.");
224
+        #endif
225
+        break;
226
+      }
227
+    }
228
+
229
+    if (err_break) break;
230
+
231
+    // Restore the active tool after homing
232
+    #if HOTENDS > 1
233
+      tool_change(old_tool_index, 0,
234
+        #if ENABLED(PARKING_EXTRUDER)
235
+          false // Fetch the previous toolhead
236
+        #else
237
+          true
238
+        #endif
239
+      );
240
+    #endif
241
+
242
+    #if HAS_LEVELING
243
+      #if ENABLED(RESTORE_LEVELING_AFTER_G34)
244
+        set_bed_leveling_enabled(leveling_was_active);
245
+      #endif
246
+    #endif
247
+
248
+    // After this operation the z position needs correction
249
+    set_axis_is_not_at_home(Z_AXIS);
250
+
251
+    gcode.G28(false);
252
+
253
+  } while(0);
254
+
255
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
256
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G34");
257
+  #endif
258
+}
259
+
260
+/**
261
+ * M422: Z-Stepper automatic alignment parameter selection
262
+ */
263
+void GcodeSuite::M422() {
264
+  const int8_t zstepper = parser.intval('S') - 1;
265
+  if (!WITHIN(zstepper, 0, Z_STEPPER_COUNT - 1)) {
266
+    SERIAL_PROTOCOLLNPGM("?(S) Z-Stepper index invalid.");
267
+    return;
268
+  }
269
+
270
+  const float x_pos = parser.floatval('X', z_auto_align_xpos[zstepper]);
271
+  if (!WITHIN(x_pos, X_MIN_POS, X_MAX_POS)) {
272
+    SERIAL_PROTOCOLLNPGM("?(X) out of bounds.");
273
+    return;
274
+  }
275
+
276
+  const float y_pos = parser.floatval('Y', z_auto_align_ypos[zstepper]);
277
+  if (!WITHIN(y_pos, Y_MIN_POS, Y_MAX_POS)) {
278
+    SERIAL_PROTOCOLLNPGM("?(Y) out of bounds.");
279
+    return;
280
+  }
281
+
282
+  z_auto_align_xpos[zstepper] = x_pos;
283
+  z_auto_align_ypos[zstepper] = y_pos;
284
+}
285
+
286
+#endif // Z_STEPPER_AUTO_ALIGN

+ 9
- 1
Marlin/src/gcode/gcode.cpp View File

252
         case 33: G33(); break;                                    // G33: Delta Auto-Calibration
252
         case 33: G33(); break;                                    // G33: Delta Auto-Calibration
253
       #endif
253
       #endif
254
 
254
 
255
+      #if ENABLED(Z_STEPPER_AUTO_ALIGN)
256
+        case 34: G34(); break;                                    // G34: Z Stepper automatic alignment using probe
257
+      #endif
258
+
255
       #if ENABLED(G38_PROBE_TARGET)
259
       #if ENABLED(G38_PROBE_TARGET)
256
-        case 38:                                                  // G38.2 & G38.3
260
+        case 38:                                                  // G38.2 & G38.3: Probe towards target
257
           if (parser.subcode == 2 || parser.subcode == 3)
261
           if (parser.subcode == 2 || parser.subcode == 3)
258
             G38(parser.subcode == 2);
262
             G38(parser.subcode == 2);
259
           break;
263
           break;
677
         case 869: M869(); break;                                  // M869: Report axis error
681
         case 869: M869(); break;                                  // M869: Report axis error
678
       #endif
682
       #endif
679
 
683
 
684
+      #if ENABLED(Z_STEPPER_AUTO_ALIGN)
685
+        case 422: M422(); break;                                  // M422: Set Z Stepper automatic alignment position using probe
686
+      #endif
687
+
680
       case 999: M999(); break;                                    // M999: Restart after being Stopped
688
       case 999: M999(); break;                                    // M999: Restart after being Stopped
681
 
689
 
682
       default: parser.unknown_command_error(); break;
690
       default: parser.unknown_command_error(); break;

+ 7
- 0
Marlin/src/gcode/gcode.h View File

63
  * G31  - Dock sled (Z_PROBE_SLED only)
63
  * G31  - Dock sled (Z_PROBE_SLED only)
64
  * G32  - Undock sled (Z_PROBE_SLED only)
64
  * G32  - Undock sled (Z_PROBE_SLED only)
65
  * G33  - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
65
  * G33  - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
66
+ * G34  - Z Stepper automatic alignment using probe: I<iterations> T<accuracy> A<amplification> (Requires Z_STEPPER_AUTO_ALIGN)
66
  * G38  - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
67
  * G38  - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
67
  * G42  - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
68
  * G42  - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
68
  * G80  - Cancel current motion mode (Requires GCODE_MOTION_MODES)
69
  * G80  - Cancel current motion mode (Requires GCODE_MOTION_MODES)
197
  * M410 - Quickstop. Abort all planned moves.
198
  * M410 - Quickstop. Abort all planned moves.
198
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
199
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
199
  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL)
200
  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL)
201
+ * M422 - Set Z Stepper automatic alignment position using probe. X<units> Y<units> A<axis> (Requires Z_STEPPER_AUTO_ALIGN)
200
  * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
202
  * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
201
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
203
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
202
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
204
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
409
     static void G33();
411
     static void G33();
410
   #endif
412
   #endif
411
 
413
 
414
+  #if ENABLED(Z_STEPPER_AUTO_ALIGN)
415
+    static void G34();
416
+    static void M422();
417
+  #endif
418
+
412
   #if ENABLED(G38_PROBE_TARGET)
419
   #if ENABLED(G38_PROBE_TARGET)
413
     static void G38(const bool is_38_2);
420
     static void G38(const bool is_38_2);
414
   #endif
421
   #endif

+ 8
- 0
Marlin/src/inc/Conditionals_post.h View File

1632
   #define USE_EXECUTE_COMMANDS_IMMEDIATE
1632
   #define USE_EXECUTE_COMMANDS_IMMEDIATE
1633
 #endif
1633
 #endif
1634
 
1634
 
1635
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
1636
+  #define Z_STEPPER_COUNT 3
1637
+#elif ENABLED(Z_DUAL_STEPPER_DRIVERS)
1638
+  #define Z_STEPPER_COUNT 2
1639
+#else
1640
+  #define Z_STEPPER_COUNT 1
1641
+#endif
1642
+
1635
 #endif // CONDITIONALS_POST_H
1643
 #endif // CONDITIONALS_POST_H

+ 13
- 0
Marlin/src/inc/SanityCheck.h View File

1880
   #error "FAST_PWM_FAN only supported by 8 bit CPUs."
1880
   #error "FAST_PWM_FAN only supported by 8 bit CPUs."
1881
 #endif
1881
 #endif
1882
 
1882
 
1883
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
1884
+  #if !Z_MULTI_STEPPER_DRIVERS
1885
+    #error "Z_STEPPER_AUTO_ALIGN requires Z_DUAL_STEPPER_DRIVERS or Z_TRIPLE_STEPPER_DRIVERS."
1886
+  #elif !HAS_BED_PROBE
1887
+    #error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
1888
+  #endif
1889
+  constexpr float sanity_arr_z_align_x[] = Z_STEPPER_ALIGN_X, sanity_arr_z_align_y[] = Z_STEPPER_ALIGN_Y;
1890
+  static_assert(
1891
+    COUNT(sanity_arr_z_align_x) == Z_STEPPER_COUNT && COUNT(sanity_arr_z_align_y) == Z_STEPPER_COUNT,
1892
+    "Z_STEPPER_ALIGN_[XY]POS settings require one element per Z stepper."
1893
+  );
1894
+#endif
1895
+
1883
 #if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)
1896
 #if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)
1884
   #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
1897
   #error "PRINTCOUNTER requires EEPROM_SETTINGS. Please update your Configuration."
1885
 #endif
1898
 #endif

+ 1
- 0
Marlin/src/lcd/language/language_de.h View File

51
 #define MSG_AUTO_HOME_X                     _UxGT("Home X")
51
 #define MSG_AUTO_HOME_X                     _UxGT("Home X")
52
 #define MSG_AUTO_HOME_Y                     _UxGT("Home Y")
52
 #define MSG_AUTO_HOME_Y                     _UxGT("Home Y")
53
 #define MSG_AUTO_HOME_Z                     _UxGT("Home Z")
53
 #define MSG_AUTO_HOME_Z                     _UxGT("Home Z")
54
+#define MSG_AUTO_Z_ALIGN                    _UxGT("Z-Achsen abgleichen")
54
 #define MSG_TMC_Z_CALIBRATION               _UxGT("Kalibriere Z")
55
 #define MSG_TMC_Z_CALIBRATION               _UxGT("Kalibriere Z")
55
 #define MSG_LEVEL_BED_HOMING                _UxGT("Home XYZ")
56
 #define MSG_LEVEL_BED_HOMING                _UxGT("Home XYZ")
56
 #define MSG_LEVEL_BED_WAITING               _UxGT("Klick zum Starten")
57
 #define MSG_LEVEL_BED_WAITING               _UxGT("Klick zum Starten")

+ 3
- 0
Marlin/src/lcd/language/language_en.h View File

91
 #ifndef MSG_AUTO_HOME_Z
91
 #ifndef MSG_AUTO_HOME_Z
92
   #define MSG_AUTO_HOME_Z                     _UxGT("Home Z")
92
   #define MSG_AUTO_HOME_Z                     _UxGT("Home Z")
93
 #endif
93
 #endif
94
+#ifndef MSG_AUTO_Z_ALIGN
95
+  #define MSG_AUTO_Z_ALIGN                    _UxGT("Auto Z-Align")
96
+#endif
94
 #ifndef MSG_TMC_Z_CALIBRATION
97
 #ifndef MSG_TMC_Z_CALIBRATION
95
   #define MSG_TMC_Z_CALIBRATION               _UxGT("Calibrate Z")
98
   #define MSG_TMC_Z_CALIBRATION               _UxGT("Calibrate Z")
96
 #endif
99
 #endif

+ 7
- 0
Marlin/src/lcd/menu/menu_motion.cpp View File

452
   #endif
452
   #endif
453
 
453
 
454
   //
454
   //
455
+  // Auto Z-Align
456
+  //
457
+  #if ENABLED(Z_STEPPER_AUTO_ALIGN)
458
+    MENU_ITEM(gcode, MSG_AUTO_Z_ALIGN, PSTR("G34"));
459
+  #endif
460
+
461
+  //
455
   // TMC Z Calibration
462
   // TMC Z Calibration
456
   //
463
   //
457
   #if ENABLED(TMC_Z_CALIBRATION)
464
   #if ENABLED(TMC_Z_CALIBRATION)

+ 29
- 11
Marlin/src/module/motion.cpp View File

1210
 }
1210
 }
1211
 
1211
 
1212
 /**
1212
 /**
1213
+ * Set an axis' to be unhomed.
1214
+ */
1215
+void set_axis_is_not_at_home(const AxisEnum axis) {
1216
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
1217
+    if (DEBUGGING(LEVELING)) {
1218
+      SERIAL_ECHOPAIR(">>> set_axis_is_not_at_home(", axis_codes[axis]);
1219
+      SERIAL_CHAR(')');
1220
+      SERIAL_EOL();
1221
+    }
1222
+  #endif
1223
+
1224
+  CBI(axis_known_position, axis);
1225
+  CBI(axis_homed, axis);
1226
+
1227
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
1228
+    if (DEBUGGING(LEVELING)) {
1229
+      SERIAL_ECHOPAIR("<<< set_axis_is_not_at_home(", axis_codes[axis]);
1230
+      SERIAL_CHAR(')');
1231
+      SERIAL_EOL();
1232
+    }
1233
+  #endif
1234
+
1235
+  #if ENABLED(I2C_POSITION_ENCODERS)
1236
+    I2CPEM.unhomed(axis);
1237
+  #endif
1238
+}
1239
+
1240
+/**
1213
  * Home an individual "raw axis" to its endstop.
1241
  * Home an individual "raw axis" to its endstop.
1214
  * This applies to XYZ on Cartesian and Core robots, and
1242
  * This applies to XYZ on Cartesian and Core robots, and
1215
  * to the individual ABC steppers on DELTA and SCARA.
1243
  * to the individual ABC steppers on DELTA and SCARA.
1260
       #if ENABLED(Y_DUAL_ENDSTOPS)
1288
       #if ENABLED(Y_DUAL_ENDSTOPS)
1261
         case Y_AXIS:
1289
         case Y_AXIS:
1262
       #endif
1290
       #endif
1263
-      #if ENABLED(Z_DUAL_ENDSTOPS)
1264
-        case Z_AXIS:
1265
-      #endif
1266
-      stepper.set_separate_multi_axis(true);
1267
-      default: break;
1268
-    }
1269
-  #endif
1270
-
1271
-  #if ENABLED(Z_TRIPLE_ENDSTOPS)
1272
-    switch (axis) {
1273
-      #if ENABLED(Z_TRIPLE_ENDSTOPS)
1291
+      #if Z_MULTI_ENDSTOPS
1274
         case Z_AXIS:
1292
         case Z_AXIS:
1275
       #endif
1293
       #endif
1276
       stepper.set_separate_multi_axis(true);
1294
       stepper.set_separate_multi_axis(true);

+ 2
- 0
Marlin/src/module/motion.h View File

197
 
197
 
198
 void set_axis_is_at_home(const AxisEnum axis);
198
 void set_axis_is_at_home(const AxisEnum axis);
199
 
199
 
200
+void set_axis_is_not_at_home(const AxisEnum axis);
201
+
200
 void homeaxis(const AxisEnum axis);
202
 void homeaxis(const AxisEnum axis);
201
 
203
 
202
 #if ENABLED(SENSORLESS_HOMING)
204
 #if ENABLED(SENSORLESS_HOMING)

+ 17
- 5
Marlin/src/module/stepper.cpp View File

115
 
115
 
116
 // public:
116
 // public:
117
 
117
 
118
-#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
118
+#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
119
   bool Stepper::separate_multi_axis = false;
119
   bool Stepper::separate_multi_axis = false;
120
 #endif
120
 #endif
121
 
121
 
142
 #if ENABLED(Y_DUAL_ENDSTOPS)
142
 #if ENABLED(Y_DUAL_ENDSTOPS)
143
   bool Stepper::locked_Y_motor = false, Stepper::locked_Y2_motor = false;
143
   bool Stepper::locked_Y_motor = false, Stepper::locked_Y2_motor = false;
144
 #endif
144
 #endif
145
-#if Z_MULTI_ENDSTOPS
145
+#if Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
146
   bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false;
146
   bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false;
147
 #endif
147
 #endif
148
-#if ENABLED(Z_TRIPLE_ENDSTOPS)
148
+#if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
149
   bool Stepper::locked_Z3_motor = false;
149
   bool Stepper::locked_Z3_motor = false;
150
 #endif
150
 #endif
151
 
151
 
211
 volatile int32_t Stepper::count_position[NUM_AXIS] = { 0 };
211
 volatile int32_t Stepper::count_position[NUM_AXIS] = { 0 };
212
 int8_t Stepper::count_direction[NUM_AXIS] = { 0, 0, 0, 0 };
212
 int8_t Stepper::count_direction[NUM_AXIS] = { 0, 0, 0, 0 };
213
 
213
 
214
-#define DUAL_ENDSTOP_APPLY_STEP(A,V)                                                                                       \
214
+#define DUAL_ENDSTOP_APPLY_STEP(A,V)                                                                                        \
215
   if (separate_multi_axis) {                                                                                                \
215
   if (separate_multi_axis) {                                                                                                \
216
     if (A##_HOME_DIR < 0) {                                                                                                 \
216
     if (A##_HOME_DIR < 0) {                                                                                                 \
217
       if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V);    \
217
       if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V);    \
227
     A##2_STEP_WRITE(V);                                                                                                     \
227
     A##2_STEP_WRITE(V);                                                                                                     \
228
   }
228
   }
229
 
229
 
230
-#define TRIPLE_ENDSTOP_APPLY_STEP(A,V)                                                                                       \
230
+#define DUAL_SEPARATE_APPLY_STEP(A,V)             \
231
+  if (separate_multi_axis) {                      \
232
+    if (!locked_##A##_motor) A##_STEP_WRITE(V);   \
233
+    if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \
234
+  }                                               \
235
+  else {                                          \
236
+    A##_STEP_WRITE(V);                            \
237
+    A##2_STEP_WRITE(V);                           \
238
+  }
239
+
240
+#define TRIPLE_ENDSTOP_APPLY_STEP(A,V)                                                                                      \
231
   if (separate_multi_axis) {                                                                                                \
241
   if (separate_multi_axis) {                                                                                                \
232
     if (A##_HOME_DIR < 0) {                                                                                                 \
242
     if (A##_HOME_DIR < 0) {                                                                                                 \
233
       if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V);    \
243
       if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V);    \
298
   #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }while(0)
308
   #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }while(0)
299
   #if ENABLED(Z_DUAL_ENDSTOPS)
309
   #if ENABLED(Z_DUAL_ENDSTOPS)
300
     #define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
310
     #define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
311
+  #elif ENABLED(Z_STEPPER_AUTO_ALIGN)
312
+    #define Z_APPLY_STEP(v,Q) DUAL_SEPARATE_APPLY_STEP(Z,v)
301
   #else
313
   #else
302
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }while(0)
314
     #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }while(0)
303
   #endif
315
   #endif

+ 6
- 6
Marlin/src/module/stepper.h View File

244
 
244
 
245
   public:
245
   public:
246
 
246
 
247
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
247
+    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
248
       static bool separate_multi_axis;
248
       static bool separate_multi_axis;
249
     #endif
249
     #endif
250
 
250
 
277
     #if ENABLED(Y_DUAL_ENDSTOPS)
277
     #if ENABLED(Y_DUAL_ENDSTOPS)
278
       static bool locked_Y_motor, locked_Y2_motor;
278
       static bool locked_Y_motor, locked_Y2_motor;
279
     #endif
279
     #endif
280
-    #if Z_MULTI_ENDSTOPS
280
+    #if Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
281
       static bool locked_Z_motor, locked_Z2_motor;
281
       static bool locked_Z_motor, locked_Z2_motor;
282
     #endif
282
     #endif
283
-    #if ENABLED(Z_TRIPLE_ENDSTOPS)
283
+    #if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
284
       static bool locked_Z3_motor;
284
       static bool locked_Z3_motor;
285
     #endif
285
     #endif
286
 
286
 
421
       static void microstep_readings();
421
       static void microstep_readings();
422
     #endif
422
     #endif
423
 
423
 
424
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
424
+    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
425
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
425
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
426
     #endif
426
     #endif
427
     #if ENABLED(X_DUAL_ENDSTOPS)
427
     #if ENABLED(X_DUAL_ENDSTOPS)
432
       FORCE_INLINE static void set_y_lock(const bool state) { locked_Y_motor = state; }
432
       FORCE_INLINE static void set_y_lock(const bool state) { locked_Y_motor = state; }
433
       FORCE_INLINE static void set_y2_lock(const bool state) { locked_Y2_motor = state; }
433
       FORCE_INLINE static void set_y2_lock(const bool state) { locked_Y2_motor = state; }
434
     #endif
434
     #endif
435
-    #if Z_MULTI_ENDSTOPS
435
+    #if Z_MULTI_ENDSTOPS || (ENABLED(Z_STEPPER_AUTO_ALIGN) && Z_MULTI_STEPPER_DRIVERS)
436
       FORCE_INLINE static void set_z_lock(const bool state) { locked_Z_motor = state; }
436
       FORCE_INLINE static void set_z_lock(const bool state) { locked_Z_motor = state; }
437
       FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
437
       FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
438
     #endif
438
     #endif
439
-    #if ENABLED(Z_TRIPLE_ENDSTOPS)
439
+    #if ENABLED(Z_TRIPLE_ENDSTOPS) || (ENABLED(Z_STEPPER_AUTO_ALIGN) && ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
440
       FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
440
       FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
441
     #endif
441
     #endif
442
 
442
 

+ 4
- 4
buildroot/share/tests/DUE_tests View File

15
 
15
 
16
 restore_configs
16
 restore_configs
17
 opt_set MOTHERBOARD BOARD_RADDS
17
 opt_set MOTHERBOARD BOARD_RADDS
18
-opt_enable USE_XMAX_PLUG USE_YMAX_PLUG
19
-opt_enable_adv Z_TRIPLE_STEPPER_DRIVERS Z_TRIPLE_ENDSTOPS
18
+opt_enable USE_XMAX_PLUG USE_YMAX_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR
19
+opt_enable_adv Z_TRIPLE_STEPPER_DRIVERS Z_TRIPLE_ENDSTOPS Z_STEPPER_AUTO_ALIGN
20
 opt_add_adv Z2_MAX_ENDSTOP_INVERTING false
20
 opt_add_adv Z2_MAX_ENDSTOP_INVERTING false
21
 opt_add_adv Z3_MAX_ENDSTOP_INVERTING false
21
 opt_add_adv Z3_MAX_ENDSTOP_INVERTING false
22
 pins_set RAMPS X_MAX_PIN -1
22
 pins_set RAMPS X_MAX_PIN -1
23
 pins_set RAMPS Y_MAX_PIN -1
23
 pins_set RAMPS Y_MAX_PIN -1
24
 opt_add_adv Z2_MAX_PIN 2
24
 opt_add_adv Z2_MAX_PIN 2
25
 opt_add_adv Z3_MAX_PIN 3
25
 opt_add_adv Z3_MAX_PIN 3
26
-exec_test $1 $2 "RADDS Z_TRIPLE"
26
+exec_test $1 $2 "Test RADDS with Z_TRIPLE_STEPPER_DRIVERS and Z_STEPPER_AUTO_ALIGN"
27
 
27
 
28
 #
28
 #
29
 # Test SWITCHING_EXTRUDER
29
 # Test SWITCHING_EXTRUDER
33
 opt_set EXTRUDERS 2
33
 opt_set EXTRUDERS 2
34
 opt_set NUM_SERVOS 1
34
 opt_set NUM_SERVOS 1
35
 opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
35
 opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
36
-exec_test $1 $2 "SWITCHING_EXTRUDER"
36
+exec_test $1 $2 "Test RAMPS4DUE with SWITCHING_EXTRUDER"

Loading…
Cancel
Save