Browse Source

M425 Backlash Correction (#11061)

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

+ 33
- 0
Marlin/Configuration_adv.h View File

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

@@ -489,6 +489,39 @@
489 489
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
490 490
 #endif
491 491
 
492
+//
493
+// Backlash Compensation
494
+// Adds extra movement to axes on direction-changes to account for backlash.
495
+//
496
+//#define BACKLASH_COMPENSATION
497
+#if ENABLED(BACKLASH_COMPENSATION)
498
+  // Define values for backlash distance and correction.
499
+  // If BACKLASH_GCODE is enabled these values are the defaults.
500
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
501
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
502
+
503
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
504
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
505
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
506
+
507
+  // Add runtime configuration and tuning of backlash values (M425)
508
+  //#define BACKLASH_GCODE
509
+
510
+  #if ENABLED(BACKLASH_GCODE)
511
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
512
+    #define MEASURE_BACKLASH_WHEN_PROBING
513
+
514
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
515
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
516
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
517
+      // increments while checking for the contact to be broken.
518
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
519
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
520
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
521
+    #endif
522
+  #endif
523
+#endif
524
+
492 525
 /**
493 526
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
494 527
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/ArmEd/Configuration_adv.h View File

@@ -473,6 +473,39 @@
473 473
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
474 474
 #endif
475 475
 
476
+//
477
+// Backlash Compensation
478
+// Adds extra movement to axes on direction-changes to account for backlash.
479
+//
480
+//#define BACKLASH_COMPENSATION
481
+#if ENABLED(BACKLASH_COMPENSATION)
482
+  // Define values for backlash distance and correction.
483
+  // If BACKLASH_GCODE is enabled these values are the defaults.
484
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
485
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
486
+
487
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
488
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
489
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
490
+
491
+  // Add runtime configuration and tuning of backlash values (M425)
492
+  //#define BACKLASH_GCODE
493
+
494
+  #if ENABLED(BACKLASH_GCODE)
495
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
496
+    #define MEASURE_BACKLASH_WHEN_PROBING
497
+
498
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
499
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
500
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
501
+      // increments while checking for the contact to be broken.
502
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
503
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
504
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
505
+    #endif
506
+  #endif
507
+#endif
508
+
476 509
 /**
477 510
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
478 511
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -489,6 +489,39 @@
489 489
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
490 490
 #endif
491 491
 
492
+//
493
+// Backlash Compensation
494
+// Adds extra movement to axes on direction-changes to account for backlash.
495
+//
496
+//#define BACKLASH_COMPENSATION
497
+#if ENABLED(BACKLASH_COMPENSATION)
498
+  // Define values for backlash distance and correction.
499
+  // If BACKLASH_GCODE is enabled these values are the defaults.
500
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
501
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
502
+
503
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
504
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
505
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
506
+
507
+  // Add runtime configuration and tuning of backlash values (M425)
508
+  //#define BACKLASH_GCODE
509
+
510
+  #if ENABLED(BACKLASH_GCODE)
511
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
512
+    #define MEASURE_BACKLASH_WHEN_PROBING
513
+
514
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
515
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
516
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
517
+      // increments while checking for the contact to be broken.
518
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
519
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
520
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
521
+    #endif
522
+  #endif
523
+#endif
524
+
492 525
 /**
493 526
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
494 527
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -494,6 +494,39 @@
494 494
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
495 495
 #endif
496 496
 
497
+//
498
+// Backlash Compensation
499
+// Adds extra movement to axes on direction-changes to account for backlash.
500
+//
501
+//#define BACKLASH_COMPENSATION
502
+#if ENABLED(BACKLASH_COMPENSATION)
503
+  // Define values for backlash distance and correction.
504
+  // If BACKLASH_GCODE is enabled these values are the defaults.
505
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
506
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
507
+
508
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
509
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
510
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
511
+
512
+  // Add runtime configuration and tuning of backlash values (M425)
513
+  //#define BACKLASH_GCODE
514
+
515
+  #if ENABLED(BACKLASH_GCODE)
516
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
517
+    #define MEASURE_BACKLASH_WHEN_PROBING
518
+
519
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
520
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
521
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
522
+      // increments while checking for the contact to be broken.
523
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
524
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
525
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
526
+    #endif
527
+  #endif
528
+#endif
529
+
497 530
 /**
498 531
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
499 532
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -495,6 +495,39 @@
495 495
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
496 496
 #endif
497 497
 
498
+//
499
+// Backlash Compensation
500
+// Adds extra movement to axes on direction-changes to account for backlash.
501
+//
502
+//#define BACKLASH_COMPENSATION
503
+#if ENABLED(BACKLASH_COMPENSATION)
504
+  // Define values for backlash distance and correction.
505
+  // If BACKLASH_GCODE is enabled these values are the defaults.
506
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
507
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
508
+
509
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
510
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
511
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
512
+
513
+  // Add runtime configuration and tuning of backlash values (M425)
514
+  //#define BACKLASH_GCODE
515
+
516
+  #if ENABLED(BACKLASH_GCODE)
517
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
518
+    #define MEASURE_BACKLASH_WHEN_PROBING
519
+
520
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
521
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
522
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
523
+      // increments while checking for the contact to be broken.
524
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
525
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
526
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
527
+    #endif
528
+  #endif
529
+#endif
530
+
498 531
 /**
499 532
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
500 533
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.01  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h View File

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -503,6 +503,39 @@
503 503
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
504 504
 #endif
505 505
 
506
+//
507
+// Backlash Compensation
508
+// Adds extra movement to axes on direction-changes to account for backlash.
509
+//
510
+//#define BACKLASH_COMPENSATION
511
+#if ENABLED(BACKLASH_COMPENSATION)
512
+  // Define values for backlash distance and correction.
513
+  // If BACKLASH_GCODE is enabled these values are the defaults.
514
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
515
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
516
+
517
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
518
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
519
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
520
+
521
+  // Add runtime configuration and tuning of backlash values (M425)
522
+  //#define BACKLASH_GCODE
523
+
524
+  #if ENABLED(BACKLASH_GCODE)
525
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
526
+    #define MEASURE_BACKLASH_WHEN_PROBING
527
+
528
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
529
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
530
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
531
+      // increments while checking for the contact to be broken.
532
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
533
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
534
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
535
+    #endif
536
+  #endif
537
+#endif
538
+
506 539
 /**
507 540
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
508 541
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h View File

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h View File

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 33
- 0
Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h View File

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -492,6 +492,39 @@
492 492
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
493 493
 #endif
494 494
 
495
+//
496
+// Backlash Compensation
497
+// Adds extra movement to axes on direction-changes to account for backlash.
498
+//
499
+//#define BACKLASH_COMPENSATION
500
+#if ENABLED(BACKLASH_COMPENSATION)
501
+  // Define values for backlash distance and correction.
502
+  // If BACKLASH_GCODE is enabled these values are the defaults.
503
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
504
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
505
+
506
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
507
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
508
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
509
+
510
+  // Add runtime configuration and tuning of backlash values (M425)
511
+  //#define BACKLASH_GCODE
512
+
513
+  #if ENABLED(BACKLASH_GCODE)
514
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
515
+    #define MEASURE_BACKLASH_WHEN_PROBING
516
+
517
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
518
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
519
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
520
+      // increments while checking for the contact to be broken.
521
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
522
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
523
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
524
+    #endif
525
+  #endif
526
+#endif
527
+
495 528
 /**
496 529
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
497 530
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

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

@@ -490,6 +490,39 @@
490 490
   #define JUNCTION_DEVIATION_MM 0.02  // (mm) Distance from real junction edge
491 491
 #endif
492 492
 
493
+//
494
+// Backlash Compensation
495
+// Adds extra movement to axes on direction-changes to account for backlash.
496
+//
497
+//#define BACKLASH_COMPENSATION
498
+#if ENABLED(BACKLASH_COMPENSATION)
499
+  // Define values for backlash distance and correction.
500
+  // If BACKLASH_GCODE is enabled these values are the defaults.
501
+  #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
502
+  #define BACKLASH_CORRECTION    0.0       // 0.0 = no correction; 1.0 = full correction
503
+
504
+  // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
505
+  // to reduce print artifacts. (Enabling this is costly in memory and computation!)
506
+  //#define BACKLASH_SMOOTHING_MM 3 // (mm)
507
+
508
+  // Add runtime configuration and tuning of backlash values (M425)
509
+  //#define BACKLASH_GCODE
510
+
511
+  #if ENABLED(BACKLASH_GCODE)
512
+    // Measure the Z backlash when probing (G29) and set with "M425 Z"
513
+    #define MEASURE_BACKLASH_WHEN_PROBING
514
+
515
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
516
+      // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
517
+      // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
518
+      // increments while checking for the contact to be broken.
519
+      #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
520
+      #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
521
+      #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_SPEED_SLOW // (mm/m)
522
+    #endif
523
+  #endif
524
+#endif
525
+
493 526
 /**
494 527
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
495 528
  * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible

+ 1
- 1
Marlin/src/feature/tmc_util.cpp View File

@@ -81,7 +81,7 @@
81 81
       static uint8_t get_status_response(TMC2208Stepper &st, uint32_t drv_status) {
82 82
         uint8_t gstat = st.GSTAT();
83 83
         uint8_t response = 0;
84
-        response |= (drv_status >> (31-3)) & 0b1000;
84
+        response |= (drv_status >> (31 - 3)) & 0b1000;
85 85
         response |= gstat & 0b11;
86 86
         return response;
87 87
       }

+ 123
- 0
Marlin/src/gcode/calibrate/M425.cpp View File

@@ -0,0 +1,123 @@
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(BACKLASH_GCODE)
26
+
27
+#include "../../module/planner.h"
28
+
29
+float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM,
30
+      backlash_correction = BACKLASH_CORRECTION;
31
+
32
+#ifdef BACKLASH_SMOOTHING_MM
33
+  float backlash_smoothing_mm = BACKLASH_SMOOTHING_MM;
34
+#endif
35
+
36
+#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
37
+  float backlash_measured_mm[XYZ] = { 0 };
38
+  uint8_t backlash_measured_num[XYZ] = { 0 };
39
+#endif
40
+
41
+#include "../gcode.h"
42
+
43
+/**
44
+ * M425: Enable and tune backlash correction.
45
+ *
46
+ *   F<fraction>     Enable/disable/fade-out backlash correction (0.0 to 1.0)
47
+ *   S<smoothing_mm> Distance over which backlash correction is spread
48
+ *   X<distance_mm>  Set the backlash distance on X (0 to disable)
49
+ *   Y<distance_mm>                        ... on Y
50
+ *   Z<distance_mm>                        ... on Z
51
+ *   X               If a backlash measurement was done on X, copy that value
52
+ *   Y                                              ... on Y
53
+ *   Z                                              ... on Z
54
+ *
55
+ * Type M425 without any arguments to show active values.
56
+ */
57
+void GcodeSuite::M425() {
58
+  bool noArgs = true;
59
+
60
+  LOOP_XYZ(i) {
61
+    if (parser.seen(axis_codes[i])) {
62
+      planner.synchronize();
63
+      const float measured_backlash = (
64
+        #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
65
+          backlash_measured_num[i] > 0 ? backlash_measured_mm[i] / backlash_measured_num[i] : 0
66
+        #else
67
+          0
68
+        #endif
69
+      );
70
+      backlash_distance_mm[i] = parser.has_value() ? parser.value_linear_units() : measured_backlash;
71
+      noArgs = false;
72
+    }
73
+  }
74
+
75
+  if (parser.seen('F')) {
76
+    planner.synchronize();
77
+    backlash_correction = max(0, min(1.0, parser.value_linear_units()));
78
+    noArgs = false;
79
+  }
80
+
81
+  #ifdef BACKLASH_SMOOTHING_MM
82
+    if (parser.seen('S')) {
83
+      planner.synchronize();
84
+      backlash_smoothing_mm = parser.value_linear_units();
85
+      noArgs = false;
86
+    }
87
+  #endif
88
+
89
+  if (noArgs) {
90
+    SERIAL_ECHOPGM("Backlash correction is ");
91
+    if (!backlash_correction) SERIAL_ECHOPGM("in");
92
+    SERIAL_ECHOLNPGM("active:");
93
+    SERIAL_ECHOPAIR("  Correction Amount/Fade-out:     F", backlash_correction);
94
+    SERIAL_ECHOLNPGM("     (F1.0 = full, F0.0 = none)");
95
+    SERIAL_ECHOPGM("  Backlash Distance (mm):        ");
96
+    LOOP_XYZ(a) {
97
+      SERIAL_CHAR(' ');
98
+      SERIAL_CHAR(axis_codes[a]);
99
+      SERIAL_ECHO(backlash_distance_mm[a]);
100
+      SERIAL_EOL();
101
+    }
102
+
103
+    #ifdef BACKLASH_SMOOTHING_MM
104
+      SERIAL_ECHOLNPAIR("  Smoothing (mm):                 S", backlash_smoothing_mm);
105
+    #endif
106
+
107
+    #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
108
+      SERIAL_ECHOPGM("  Average measured backlash (mm):");
109
+      LOOP_XYZ(a) {
110
+        if (backlash_measured_num[a] > 0) {
111
+          SERIAL_CHAR(' ');
112
+          SERIAL_CHAR(axis_codes[a]);
113
+          SERIAL_ECHO(backlash_measured_mm[a] / backlash_measured_num[a]);
114
+        }
115
+      }
116
+      if (!backlash_measured_num[X_AXIS] && !backlash_measured_num[Y_AXIS] && !backlash_measured_num[Z_AXIS])
117
+        SERIAL_ECHOPGM(" (Not yet measured)");
118
+      SERIAL_EOL();
119
+    #endif
120
+  }
121
+}
122
+
123
+#endif // BACKLASH_GCODE

+ 4
- 0
Marlin/src/gcode/gcode.cpp View File

@@ -576,6 +576,10 @@ void GcodeSuite::process_parsed_command(
576 576
         case 421: M421(); break;                                  // M421: Set a Mesh Bed Leveling Z coordinate
577 577
       #endif
578 578
 
579
+      #if ENABLED(BACKLASH_GCODE)
580
+        case 425: M425(); break;                                  // M425: Tune backlash compensation
581
+      #endif
582
+
579 583
       #if HAS_M206_COMMAND
580 584
         case 428: M428(); break;                                  // M428: Apply current_position to home_offset
581 585
       #endif

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

@@ -201,6 +201,7 @@
201 201
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
202 202
  * 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)
203 203
  * M422 - Set Z Stepper automatic alignment position using probe. X<units> Y<units> A<axis> (Requires Z_STEPPER_AUTO_ALIGN)
204
+ * M425 - Enable/Disable and tune backlash correction. (Requires BACKLASH_COMPENSATION and BACKLASH_GCODE)
204 205
  * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
205 206
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
206 207
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
@@ -709,6 +710,10 @@ private:
709 710
     static void M421();
710 711
   #endif
711 712
 
713
+  #if ENABLED(BACKLASH_GCODE)
714
+    static void M425();
715
+  #endif
716
+
712 717
   #if HAS_M206_COMMAND
713 718
     static void M428();
714 719
   #endif

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

@@ -1996,3 +1996,7 @@ static_assert(sanity_arr_3[0] > 0 && sanity_arr_3[1] > 0 && sanity_arr_3[2] > 0
1996 1996
 #if ENABLED(GCODE_MACROS) && !WITHIN(GCODE_MACROS_SLOTS, 1, 10)
1997 1997
   #error "GCODE_MACROS_SLOTS must be a number from 1 to 10."
1998 1998
 #endif
1999
+
2000
+#if ENABLED(BACKLASH_COMPENSATION) && IS_CORE
2001
+  #error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
2002
+#endif

+ 157
- 56
Marlin/src/module/planner.cpp View File

@@ -1547,6 +1547,99 @@ void Planner::synchronize() {
1547 1547
 }
1548 1548
 
1549 1549
 /**
1550
+ * The following implements axis backlash correction. To minimize seams
1551
+ * on the printed part, the backlash correction only adds steps to the
1552
+ * current segment (instead of creating a new segment, which causes
1553
+ * discontinuities and print artifacts).
1554
+ *
1555
+ * When BACKLASH_SMOOTHING_MM is enabled and non-zero, the backlash
1556
+ * correction is spread over multiple segments, smoothing out print
1557
+ * artifacts even more.
1558
+ */
1559
+#if ENABLED(BACKLASH_COMPENSATION)
1560
+  #if ENABLED(BACKLASH_GCODE)
1561
+    extern float backlash_distance_mm[], backlash_correction;
1562
+    #ifdef BACKLASH_SMOOTHING_MM
1563
+      extern float backlash_smoothing_mm;
1564
+    #endif
1565
+  #else
1566
+    constexpr float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM,
1567
+                    backlash_correction = BACKLASH_CORRECTION;
1568
+    #ifdef BACKLASH_SMOOTHING_MM
1569
+      constexpr float backlash_smoothing_mm = BACKLASH_SMOOTHING_MM;
1570
+    #endif
1571
+  #endif
1572
+
1573
+  void Planner::add_backlash_correction_steps(const int32_t da, const int32_t db, const int32_t dc, const uint8_t dm, block_t * const block, float (&delta_mm)[ABCE]) {
1574
+    static uint8_t last_direction_bits;
1575
+    uint8_t changed_dir = last_direction_bits ^ dm;
1576
+    // Ignore direction change if no steps are taken in that direction
1577
+    if (da == 0) CBI(changed_dir, X_AXIS);
1578
+    if (db == 0) CBI(changed_dir, Y_AXIS);
1579
+    if (dc == 0) CBI(changed_dir, Z_AXIS);
1580
+    last_direction_bits ^= changed_dir;
1581
+
1582
+    if (backlash_correction == 0) return;
1583
+
1584
+    #ifdef BACKLASH_SMOOTHING_MM
1585
+      // The segment proportion is a value greater than 0.0 indicating how much residual_error
1586
+      // is corrected for in this segment. The contribution is based on segment length and the
1587
+      // smoothing distance. Since the computation of this proportion involves a floating point
1588
+      // division, defer computation until needed.
1589
+      float segment_proportion = 0;
1590
+
1591
+      // Residual error carried forward across multiple segments, so correction can be applied
1592
+      // to segments where there is no direction change.
1593
+      static int32_t residual_error[XYZ] = { 0 };
1594
+    #else
1595
+      // No leftover residual error from segment to segment
1596
+      int32_t residual_error[XYZ] = { 0 };
1597
+      // No direction change, no correction.
1598
+      if (!changed_dir) return;
1599
+    #endif
1600
+
1601
+    const bool positive[XYZ] = {  da > 0,  db > 0, dc > 0 },
1602
+               non_zero[XYZ] = { da != 0, db != 0, dc != 0 };
1603
+    bool made_adjustment = false;
1604
+
1605
+    LOOP_XYZ(i) {
1606
+      if (backlash_distance_mm[i]) {
1607
+        // When an axis changes direction, add axis backlash to the residual error
1608
+        if (TEST(changed_dir, i))
1609
+          residual_error[i] += backlash_correction * (positive[i] ? 1.0f : -1.0f) * backlash_distance_mm[i] * planner.settings.axis_steps_per_mm[i];
1610
+
1611
+        // Decide how much of the residual error to correct in this segment
1612
+        int32_t error_correction = residual_error[i];
1613
+        #ifdef BACKLASH_SMOOTHING_MM
1614
+          if (error_correction && backlash_smoothing_mm != 0) {
1615
+            // Take up a portion of the residual_error in this segment, but only when
1616
+            // the current segment travels in the same direction as the correction
1617
+            if (non_zero[i] && positive[i] == (error_correction > 0)) {
1618
+              if (segment_proportion == 0)
1619
+                segment_proportion = MIN(1.0f, block->millimeters / backlash_smoothing_mm);
1620
+              error_correction *= segment_proportion;
1621
+            }
1622
+            else
1623
+              error_correction = 0; // Don't take up any backlash in this segment, as it would subtract steps
1624
+          }
1625
+        #endif
1626
+        // Making a correction reduces the residual error and modifies delta_mm
1627
+        if (error_correction) {
1628
+          block->steps[i] += ABS(error_correction);
1629
+          residual_error[i] -= error_correction;
1630
+          delta_mm[i] = (positive[i] ? 1.0f : -1.0f) * block->steps[i] * steps_to_mm[i];
1631
+          made_adjustment = true;
1632
+        }
1633
+      }
1634
+    }
1635
+
1636
+    // If any of the axes were adjusted, recompute block->millimeters
1637
+    if (made_adjustment)
1638
+      block->millimeters = SQRT(sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_AXIS]));
1639
+  }
1640
+#endif // BACKLASH_COMPENSATION
1641
+
1642
+/**
1550 1643
  * Planner::_buffer_steps
1551 1644
  *
1552 1645
  * Add a new linear movement to the planner queue (in terms of steps).
@@ -1738,6 +1831,70 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1738 1831
     block->steps[C_AXIS] = ABS(dc);
1739 1832
   #endif
1740 1833
 
1834
+  /**
1835
+   * This part of the code calculates the total length of the movement.
1836
+   * For cartesian bots, the X_AXIS is the real X movement and same for Y_AXIS.
1837
+   * But for corexy bots, that is not true. The "X_AXIS" and "Y_AXIS" motors (that should be named to A_AXIS
1838
+   * and B_AXIS) cannot be used for X and Y length, because A=X+Y and B=X-Y.
1839
+   * So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head.
1840
+   * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
1841
+   */
1842
+  #if IS_CORE
1843
+    float delta_mm[Z_HEAD + 1];
1844
+    #if CORE_IS_XY
1845
+      delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
1846
+      delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
1847
+      delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
1848
+      delta_mm[A_AXIS] = (da + db) * steps_to_mm[A_AXIS];
1849
+      delta_mm[B_AXIS] = CORESIGN(da - db) * steps_to_mm[B_AXIS];
1850
+    #elif CORE_IS_XZ
1851
+      delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
1852
+      delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
1853
+      delta_mm[Z_HEAD] = dc * steps_to_mm[C_AXIS];
1854
+      delta_mm[A_AXIS] = (da + dc) * steps_to_mm[A_AXIS];
1855
+      delta_mm[C_AXIS] = CORESIGN(da - dc) * steps_to_mm[C_AXIS];
1856
+    #elif CORE_IS_YZ
1857
+      delta_mm[X_AXIS] = da * steps_to_mm[X_AXIS];
1858
+      delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
1859
+      delta_mm[Z_HEAD] = dc * steps_to_mm[C_AXIS];
1860
+      delta_mm[B_AXIS] = (db + dc) * steps_to_mm[B_AXIS];
1861
+      delta_mm[C_AXIS] = CORESIGN(db - dc) * steps_to_mm[C_AXIS];
1862
+    #endif
1863
+  #else
1864
+    float delta_mm[ABCE];
1865
+    delta_mm[A_AXIS] = da * steps_to_mm[A_AXIS];
1866
+    delta_mm[B_AXIS] = db * steps_to_mm[B_AXIS];
1867
+    delta_mm[C_AXIS] = dc * steps_to_mm[C_AXIS];
1868
+  #endif
1869
+  delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS_N(extruder)];
1870
+
1871
+  if (block->steps[A_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[B_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[C_AXIS] < MIN_STEPS_PER_SEGMENT) {
1872
+    block->millimeters = ABS(delta_mm[E_AXIS]);
1873
+  }
1874
+  else {
1875
+    if (millimeters)
1876
+      block->millimeters = millimeters;
1877
+    else
1878
+      block->millimeters = SQRT(
1879
+        #if CORE_IS_XY
1880
+          sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_AXIS])
1881
+        #elif CORE_IS_XZ
1882
+          sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_HEAD])
1883
+        #elif CORE_IS_YZ
1884
+          sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_HEAD])
1885
+        #else
1886
+          sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_AXIS])
1887
+        #endif
1888
+      );
1889
+
1890
+    #if ENABLED(BACKLASH_COMPENSATION)
1891
+      // If we make it here, at least one of the axes has more steps than
1892
+      // MIN_STEPS_PER_SEGMENT, so the segment won't get dropped by Marlin
1893
+      // and it is okay to add steps for backlash correction.
1894
+      add_backlash_correction_steps(da, db, dc, dm, block, delta_mm);
1895
+    #endif
1896
+  }
1897
+
1741 1898
   block->steps[E_AXIS] = esteps;
1742 1899
   block->step_event_count = MAX(block->steps[A_AXIS], block->steps[B_AXIS], block->steps[C_AXIS], esteps);
1743 1900
 
@@ -1925,62 +2082,6 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1925 2082
   else
1926 2083
     NOLESS(fr_mm_s, settings.min_travel_feedrate_mm_s);
1927 2084
 
1928
-  /**
1929
-   * This part of the code calculates the total length of the movement.
1930
-   * For cartesian bots, the X_AXIS is the real X movement and same for Y_AXIS.
1931
-   * But for corexy bots, that is not true. The "X_AXIS" and "Y_AXIS" motors (that should be named to A_AXIS
1932
-   * and B_AXIS) cannot be used for X and Y length, because A=X+Y and B=X-Y.
1933
-   * So we need to create other 2 "AXIS", named X_HEAD and Y_HEAD, meaning the real displacement of the Head.
1934
-   * Having the real displacement of the head, we can calculate the total movement length and apply the desired speed.
1935
-   */
1936
-  #if IS_CORE
1937
-    float delta_mm[Z_HEAD + 1];
1938
-    #if CORE_IS_XY
1939
-      delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
1940
-      delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
1941
-      delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
1942
-      delta_mm[A_AXIS] = (da + db) * steps_to_mm[A_AXIS];
1943
-      delta_mm[B_AXIS] = CORESIGN(da - db) * steps_to_mm[B_AXIS];
1944
-    #elif CORE_IS_XZ
1945
-      delta_mm[X_HEAD] = da * steps_to_mm[A_AXIS];
1946
-      delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
1947
-      delta_mm[Z_HEAD] = dc * steps_to_mm[C_AXIS];
1948
-      delta_mm[A_AXIS] = (da + dc) * steps_to_mm[A_AXIS];
1949
-      delta_mm[C_AXIS] = CORESIGN(da - dc) * steps_to_mm[C_AXIS];
1950
-    #elif CORE_IS_YZ
1951
-      delta_mm[X_AXIS] = da * steps_to_mm[X_AXIS];
1952
-      delta_mm[Y_HEAD] = db * steps_to_mm[B_AXIS];
1953
-      delta_mm[Z_HEAD] = dc * steps_to_mm[C_AXIS];
1954
-      delta_mm[B_AXIS] = (db + dc) * steps_to_mm[B_AXIS];
1955
-      delta_mm[C_AXIS] = CORESIGN(db - dc) * steps_to_mm[C_AXIS];
1956
-    #endif
1957
-  #else
1958
-    float delta_mm[ABCE];
1959
-    delta_mm[A_AXIS] = da * steps_to_mm[A_AXIS];
1960
-    delta_mm[B_AXIS] = db * steps_to_mm[B_AXIS];
1961
-    delta_mm[C_AXIS] = dc * steps_to_mm[C_AXIS];
1962
-  #endif
1963
-  delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS_N(extruder)];
1964
-
1965
-  if (block->steps[A_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[B_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[C_AXIS] < MIN_STEPS_PER_SEGMENT) {
1966
-    block->millimeters = ABS(delta_mm[E_AXIS]);
1967
-  }
1968
-  else if (!millimeters) {
1969
-    block->millimeters = SQRT(
1970
-      #if CORE_IS_XY
1971
-        sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_AXIS])
1972
-      #elif CORE_IS_XZ
1973
-        sq(delta_mm[X_HEAD]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_HEAD])
1974
-      #elif CORE_IS_YZ
1975
-        sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_HEAD]) + sq(delta_mm[Z_HEAD])
1976
-      #else
1977
-        sq(delta_mm[X_AXIS]) + sq(delta_mm[Y_AXIS]) + sq(delta_mm[Z_AXIS])
1978
-      #endif
1979
-    );
1980
-  }
1981
-  else
1982
-    block->millimeters = millimeters;
1983
-
1984 2085
   const float inverse_millimeters = 1.0f / block->millimeters;  // Inverse millimeters to remove multiple divides
1985 2086
 
1986 2087
   // Calculate inverse time for this move. No divide by zero due to previous checks.

+ 4
- 0
Marlin/src/module/planner.h View File

@@ -338,6 +338,10 @@ class Planner {
338 338
       volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs
339 339
     #endif
340 340
 
341
+    #if ENABLED(BACKLASH_COMPENSATION)
342
+      static void add_backlash_correction_steps(const int32_t da, const int32_t db, const int32_t dc, const uint8_t dm, block_t * const block, float (&delta_mm)[ABCE]);
343
+    #endif
344
+
341 345
   public:
342 346
 
343 347
     /**

+ 28
- 0
Marlin/src/module/probe.cpp View File

@@ -511,6 +511,30 @@ bool set_probe_deployed(const bool deploy) {
511 511
   }
512 512
 #endif
513 513
 
514
+#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
515
+  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
516
+    #define TEST_PROBE_PIN (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING)
517
+  #else
518
+    #define TEST_PROBE_PIN (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING)
519
+  #endif
520
+
521
+  extern float backlash_measured_mm[];
522
+  extern uint8_t backlash_measured_num[];
523
+
524
+  /* Measure Z backlash by raising nozzle in increments until probe deactivates */
525
+  static void measure_backlash_with_probe() {
526
+    if (backlash_measured_num[Z_AXIS] == 255) return;
527
+
528
+    float start_height = current_position[Z_AXIS];
529
+    while (current_position[Z_AXIS] < (start_height + BACKLASH_MEASUREMENT_LIMIT) && TEST_PROBE_PIN)
530
+      do_blocking_move_to_z(current_position[Z_AXIS] + BACKLASH_MEASUREMENT_RESOLUTION, MMM_TO_MMS(BACKLASH_MEASUREMENT_FEEDRATE));
531
+
532
+    // The backlash from all probe points is averaged, so count the number of measurements
533
+    backlash_measured_mm[Z_AXIS] += current_position[Z_AXIS] - start_height;
534
+    backlash_measured_num[Z_AXIS]++;
535
+  }
536
+#endif
537
+
514 538
 /**
515 539
  * @brief Used by run_z_probe to do a single Z probe move.
516 540
  *
@@ -678,6 +702,10 @@ static float run_z_probe() {
678 702
         return NAN;
679 703
       }
680 704
 
705
+      #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
706
+        measure_backlash_with_probe();
707
+      #endif
708
+
681 709
   #if MULTIPLE_PROBING > 2
682 710
       probes_total += current_position[Z_AXIS];
683 711
       if (p > 1) do_blocking_move_to_z(current_position[Z_AXIS] + Z_CLEARANCE_MULTI_PROBE, MMM_TO_MMS(Z_PROBE_SPEED_FAST));

+ 1
- 1
buildroot/share/tests/megaatmega2560_tests View File

@@ -38,7 +38,7 @@ opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING \
38 38
            FWRETRACT ARC_P_CIRCLES ADVANCED_PAUSE_FEATURE CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
39 39
            POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE FAST_FILE_TRANSFER \
40 40
            LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST PINS_DEBUGGING \
41
-           MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING
41
+           MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING BACKLASH_COMPENSATION BACKLASH_GCODE
42 42
 opt_set FANMUX0_PIN 53
43 43
 exec_test $1 $2 "RAMPS with 2 extruders, RRDFGSC, Linear ABL, LEDs, and many options"
44 44
 

Loading…
Cancel
Save