Bladeren bron

Merge pull request #6031 from thinkyhead/rc_mbl_z_unhack

MBL: Disable sw endstops instead of altering Z
Scott Lahteine 8 jaren geleden
bovenliggende
commit
d15f25539b
30 gewijzigde bestanden met toevoegingen van 332 en 343 verwijderingen
  1. 2
    0
      Marlin/Conditionals_LCD.h
  2. 5
    0
      Marlin/Conditionals_post.h
  3. 9
    8
      Marlin/Configuration.h
  4. 1
    1
      Marlin/Marlin.h
  5. 49
    105
      Marlin/Marlin_main.cpp
  6. 4
    0
      Marlin/SanityCheck.h
  7. 7
    14
      Marlin/enum.h
  8. 9
    8
      Marlin/example_configurations/Cartesio/Configuration.h
  9. 8
    7
      Marlin/example_configurations/Felix/Configuration.h
  10. 9
    8
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  11. 9
    8
      Marlin/example_configurations/Hephestos/Configuration.h
  12. 9
    8
      Marlin/example_configurations/Hephestos_2/Configuration.h
  13. 9
    8
      Marlin/example_configurations/K8200/Configuration.h
  14. 9
    8
      Marlin/example_configurations/K8400/Configuration.h
  15. 9
    8
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  16. 9
    8
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  17. 9
    8
      Marlin/example_configurations/RigidBot/Configuration.h
  18. 9
    8
      Marlin/example_configurations/SCARA/Configuration.h
  19. 9
    8
      Marlin/example_configurations/TAZ4/Configuration.h
  20. 9
    8
      Marlin/example_configurations/WITBOX/Configuration.h
  21. 9
    8
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  22. 9
    8
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  23. 9
    8
      Marlin/example_configurations/delta/generic/Configuration.h
  24. 9
    8
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  25. 9
    8
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  26. 9
    8
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  27. 9
    8
      Marlin/example_configurations/makibox/Configuration.h
  28. 9
    8
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  29. 19
    0
      Marlin/mesh_bed_leveling.h
  30. 48
    48
      Marlin/ultralcd.cpp

+ 2
- 0
Marlin/Conditionals_LCD.h Bestand weergeven

369
     #undef Z_MIN_PROBE_ENDSTOP
369
     #undef Z_MIN_PROBE_ENDSTOP
370
   #endif
370
   #endif
371
 
371
 
372
+  #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
373
+
372
 #endif //CONDITIONALS_LCD_H
374
 #endif //CONDITIONALS_LCD_H

+ 5
- 0
Marlin/Conditionals_post.h Bestand weergeven

709
   #ifndef Z_CLEARANCE_BETWEEN_PROBES
709
   #ifndef Z_CLEARANCE_BETWEEN_PROBES
710
     #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT
710
     #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT
711
   #endif
711
   #endif
712
+  #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
713
+    #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
714
+  #else
715
+    #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
716
+  #endif
712
 
717
 
713
   #if IS_KINEMATIC
718
   #if IS_KINEMATIC
714
     // Check for this in the code instead
719
     // Check for this in the code instead

+ 9
- 8
Marlin/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 200
721
 #define Y_MAX_POS 200
726
 #define Z_MAX_POS 200
722
 #define Z_MAX_POS 200
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 1
- 1
Marlin/Marlin.h Bestand weergeven

304
 extern float soft_endstop_min[XYZ];
304
 extern float soft_endstop_min[XYZ];
305
 extern float soft_endstop_max[XYZ];
305
 extern float soft_endstop_max[XYZ];
306
 
306
 
307
-#if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
307
+#if HAS_SOFTWARE_ENDSTOPS
308
   extern bool soft_endstops_enabled;
308
   extern bool soft_endstops_enabled;
309
   void clamp_to_software_endstops(float target[XYZ]);
309
   void clamp_to_software_endstops(float target[XYZ]);
310
 #else
310
 #else

+ 49
- 105
Marlin/Marlin_main.cpp Bestand weergeven

414
 #endif
414
 #endif
415
 
415
 
416
 // Software Endstops are based on the configured limits.
416
 // Software Endstops are based on the configured limits.
417
-#if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
417
+#if HAS_SOFTWARE_ENDSTOPS
418
   bool soft_endstops_enabled = true;
418
   bool soft_endstops_enabled = true;
419
 #endif
419
 #endif
420
 float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
420
 float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
3450
   stepper.synchronize();
3450
   stepper.synchronize();
3451
 
3451
 
3452
   // Disable the leveling matrix before homing
3452
   // Disable the leveling matrix before homing
3453
-  #if PLANNER_LEVELING
3453
+  #if PLANNER_LEVELING || ENABLED(MESH_BED_LEVELING)
3454
     set_bed_leveling_enabled(false);
3454
     set_bed_leveling_enabled(false);
3455
   #endif
3455
   #endif
3456
 
3456
 
3464
     extruder_duplication_enabled = false;
3464
     extruder_duplication_enabled = false;
3465
   #endif
3465
   #endif
3466
 
3466
 
3467
-  /**
3468
-   * For mesh bed leveling deactivate the mesh calculations, will be turned
3469
-   * on again when homing all axis
3470
-   */
3471
-  #if ENABLED(MESH_BED_LEVELING)
3472
-    float pre_home_z = MESH_HOME_SEARCH_Z;
3473
-    if (mbl.active()) {
3474
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
3475
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL was active");
3476
-      #endif
3477
-      // Use known Z position if already homed
3478
-      if (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) {
3479
-        set_bed_leveling_enabled(false);
3480
-        pre_home_z = current_position[Z_AXIS];
3481
-      }
3482
-      else {
3483
-        mbl.set_active(false);
3484
-        current_position[Z_AXIS] = pre_home_z;
3485
-      }
3486
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
3487
-        if (DEBUGGING(LEVELING)) DEBUG_POS("Set Z to pre_home_z", current_position);
3488
-      #endif
3489
-    }
3490
-  #endif
3491
-
3492
   setup_for_endstop_or_probe_move();
3467
   setup_for_endstop_or_probe_move();
3493
   #if ENABLED(DEBUG_LEVELING_FEATURE)
3468
   #if ENABLED(DEBUG_LEVELING_FEATURE)
3494
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> endstops.enable(true)");
3469
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> endstops.enable(true)");
3620
 
3595
 
3621
   // Enable mesh leveling again
3596
   // Enable mesh leveling again
3622
   #if ENABLED(MESH_BED_LEVELING)
3597
   #if ENABLED(MESH_BED_LEVELING)
3623
-    if (mbl.has_mesh()) {
3624
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
3625
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL has mesh");
3626
-      #endif
3598
+    if (mbl.reactivate()) {
3599
+      set_bed_leveling_enabled(true);
3627
       if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
3600
       if (home_all_axis || (axis_homed[X_AXIS] && axis_homed[Y_AXIS] && homeZ)) {
3628
-        #if ENABLED(DEBUG_LEVELING_FEATURE)
3629
-          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("MBL Z homing");
3630
-        #endif
3631
-        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3632
-          #if Z_HOME_DIR > 0
3633
-            + Z_MAX_POS
3634
-          #endif
3635
-        ;
3636
-        SYNC_PLAN_POSITION_KINEMATIC();
3637
-        mbl.set_active(true);
3638
         #if ENABLED(MESH_G28_REST_ORIGIN)
3601
         #if ENABLED(MESH_G28_REST_ORIGIN)
3639
-          current_position[Z_AXIS] = 0.0;
3602
+          current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
3640
           set_destination_to_current();
3603
           set_destination_to_current();
3641
           line_to_destination(homing_feedrate_mm_s[Z_AXIS]);
3604
           line_to_destination(homing_feedrate_mm_s[Z_AXIS]);
3642
           stepper.synchronize();
3605
           stepper.synchronize();
3643
-          #if ENABLED(DEBUG_LEVELING_FEATURE)
3644
-            if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Rest Origin", current_position);
3645
-          #endif
3646
-        #else
3647
-          planner.unapply_leveling(current_position);
3648
-          #if ENABLED(DEBUG_LEVELING_FEATURE)
3649
-            if (DEBUGGING(LEVELING)) DEBUG_POS("MBL adjusted MESH_HOME_SEARCH_Z", current_position);
3650
-          #endif
3651
-        #endif
3652
-      }
3653
-      else if ((axis_homed[X_AXIS] && axis_homed[Y_AXIS] && axis_homed[Z_AXIS]) && (homeX || homeY)) {
3654
-        current_position[Z_AXIS] = pre_home_z;
3655
-        SYNC_PLAN_POSITION_KINEMATIC();
3656
-        mbl.set_active(true);
3657
-        planner.unapply_leveling(current_position);
3658
-        #if ENABLED(DEBUG_LEVELING_FEATURE)
3659
-          if (DEBUGGING(LEVELING)) DEBUG_POS("MBL Home X or Y", current_position);
3660
         #endif
3606
         #endif
3661
       }
3607
       }
3662
     }
3608
     }
3664
 
3610
 
3665
   clean_up_after_endstop_or_probe_move();
3611
   clean_up_after_endstop_or_probe_move();
3666
 
3612
 
3667
-  #if ENABLED(DEBUG_LEVELING_FEATURE)
3668
-    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28");
3669
-  #endif
3670
-
3671
   // Restore the active tool after homing
3613
   // Restore the active tool after homing
3672
   #if HOTENDS > 1
3614
   #if HOTENDS > 1
3673
     tool_change(old_tool_index, 0, true);
3615
     tool_change(old_tool_index, 0, true);
3674
   #endif
3616
   #endif
3675
 
3617
 
3676
   report_current_position();
3618
   report_current_position();
3619
+
3620
+  #if ENABLED(DEBUG_LEVELING_FEATURE)
3621
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28");
3622
+  #endif
3677
 }
3623
 }
3678
 
3624
 
3679
 #if HAS_PROBING_PROCEDURE
3625
 #if HAS_PROBING_PROCEDURE
3690
 
3636
 
3691
   inline void _mbl_goto_xy(const float &x, const float &y) {
3637
   inline void _mbl_goto_xy(const float &x, const float &y) {
3692
     const float old_feedrate_mm_s = feedrate_mm_s;
3638
     const float old_feedrate_mm_s = feedrate_mm_s;
3693
-    feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
3694
 
3639
 
3695
-    current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3696
-      #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
3697
-        + Z_CLEARANCE_BETWEEN_PROBES
3698
-      #elif Z_HOMING_HEIGHT > 0
3699
-        + Z_HOMING_HEIGHT
3700
-      #endif
3701
-    ;
3702
-    line_to_current_position();
3640
+    #if MANUAL_PROBE_HEIGHT > 0
3641
+      feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
3642
+      current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
3643
+      line_to_current_position();
3644
+    #endif
3703
 
3645
 
3704
     feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
3646
     feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED);
3705
     current_position[X_AXIS] = LOGICAL_X_POSITION(x);
3647
     current_position[X_AXIS] = LOGICAL_X_POSITION(x);
3706
     current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
3648
     current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
3707
     line_to_current_position();
3649
     line_to_current_position();
3708
 
3650
 
3709
-    #if Z_CLEARANCE_BETWEEN_PROBES > 0 || Z_HOMING_HEIGHT > 0
3651
+    #if MANUAL_PROBE_HEIGHT > 0
3710
       feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
3652
       feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS];
3711
-      current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z);
3653
+      current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + 0.2; // just slightly over the bed
3712
       line_to_current_position();
3654
       line_to_current_position();
3713
     #endif
3655
     #endif
3714
 
3656
 
3721
 
3663
 
3722
   void mbl_mesh_report() {
3664
   void mbl_mesh_report() {
3723
     SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
3665
     SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
3724
-    SERIAL_PROTOCOLLNPGM("Z search height: " STRINGIFY(MESH_HOME_SEARCH_Z));
3725
     SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
3666
     SERIAL_PROTOCOLPGM("Z offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
3726
     SERIAL_PROTOCOLLNPGM("\nMeasured points:");
3667
     SERIAL_PROTOCOLLNPGM("\nMeasured points:");
3727
     for (uint8_t py = 0; py < MESH_NUM_Y_POINTS; py++) {
3668
     for (uint8_t py = 0; py < MESH_NUM_Y_POINTS; py++) {
3757
   inline void gcode_G29() {
3698
   inline void gcode_G29() {
3758
 
3699
 
3759
     static int probe_index = -1;
3700
     static int probe_index = -1;
3701
+    #if HAS_SOFTWARE_ENDSTOPS
3702
+      static bool enable_soft_endstops;
3703
+    #endif
3704
+
3760
     const MeshLevelingState state = code_seen('S') ? (MeshLevelingState)code_value_byte() : MeshReport;
3705
     const MeshLevelingState state = code_seen('S') ? (MeshLevelingState)code_value_byte() : MeshReport;
3761
     if (state < 0 || state > 5) {
3706
     if (state < 0 || state > 5) {
3762
       SERIAL_PROTOCOLLNPGM("S out of range (0-5).");
3707
       SERIAL_PROTOCOLLNPGM("S out of range (0-5).");
3788
         }
3733
         }
3789
         // For each G29 S2...
3734
         // For each G29 S2...
3790
         if (probe_index == 0) {
3735
         if (probe_index == 0) {
3791
-          // For the initial G29 S2 make Z a positive value (e.g., 4.0)
3792
-          current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3793
-            #if Z_HOME_DIR > 0
3794
-              + Z_MAX_POS
3795
-            #endif
3796
-          ;
3797
-          SYNC_PLAN_POSITION_KINEMATIC();
3736
+          #if HAS_SOFTWARE_ENDSTOPS
3737
+            // For the initial G29 S2 save software endstop state
3738
+            enable_soft_endstops = soft_endstops_enabled;
3739
+          #endif
3798
         }
3740
         }
3799
         else {
3741
         else {
3800
           // For G29 S2 after adjusting Z.
3742
           // For G29 S2 after adjusting Z.
3801
           mbl.set_zigzag_z(probe_index - 1, current_position[Z_AXIS]);
3743
           mbl.set_zigzag_z(probe_index - 1, current_position[Z_AXIS]);
3744
+          #if HAS_SOFTWARE_ENDSTOPS
3745
+            soft_endstops_enabled = enable_soft_endstops;
3746
+          #endif
3802
         }
3747
         }
3803
         // If there's another point to sample, move there with optional lift.
3748
         // If there's another point to sample, move there with optional lift.
3804
         if (probe_index < (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
3749
         if (probe_index < (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
3805
           mbl.zigzag(probe_index, px, py);
3750
           mbl.zigzag(probe_index, px, py);
3806
           _mbl_goto_xy(mbl.get_probe_x(px), mbl.get_probe_y(py));
3751
           _mbl_goto_xy(mbl.get_probe_x(px), mbl.get_probe_y(py));
3752
+
3753
+          #if HAS_SOFTWARE_ENDSTOPS
3754
+            // Disable software endstops to allow manual adjustment
3755
+            // If G29 is not completed, they will not be re-enabled
3756
+            soft_endstops_enabled = false;
3757
+          #endif
3758
+
3807
           probe_index++;
3759
           probe_index++;
3808
         }
3760
         }
3809
         else {
3761
         else {
3810
           // One last "return to the bed" (as originally coded) at completion
3762
           // One last "return to the bed" (as originally coded) at completion
3811
-          current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
3812
-            #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
3813
-              + Z_CLEARANCE_BETWEEN_PROBES
3814
-            #elif Z_HOMING_HEIGHT > 0
3815
-              + Z_HOMING_HEIGHT
3816
-            #endif
3817
-          ;
3763
+          current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
3818
           line_to_current_position();
3764
           line_to_current_position();
3819
           stepper.synchronize();
3765
           stepper.synchronize();
3820
 
3766
 
3822
           SERIAL_PROTOCOLLNPGM("Mesh probing done.");
3768
           SERIAL_PROTOCOLLNPGM("Mesh probing done.");
3823
           probe_index = -1;
3769
           probe_index = -1;
3824
           mbl.set_has_mesh(true);
3770
           mbl.set_has_mesh(true);
3771
+          mbl.set_reactivate(true);
3825
           enqueue_and_echo_commands_P(PSTR("G28"));
3772
           enqueue_and_echo_commands_P(PSTR("G28"));
3773
+          #if HAS_BUZZER
3774
+            lcd_buzz(200, 659);
3775
+            lcd_buzz(200, 698);
3776
+          #endif
3826
         }
3777
         }
3827
         break;
3778
         break;
3828
 
3779
 
3871
         break;
3822
         break;
3872
 
3823
 
3873
       case MeshReset:
3824
       case MeshReset:
3874
-        if (mbl.active()) {
3875
-          current_position[Z_AXIS] -= MESH_HOME_SEARCH_Z;
3876
-          planner.apply_leveling(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS]);
3877
-          mbl.reset();
3878
-          SYNC_PLAN_POSITION_KINEMATIC();
3879
-        }
3880
-        else
3881
-          mbl.reset();
3825
+        reset_bed_level();
3826
+        break;
3882
 
3827
 
3883
     } // switch(state)
3828
     } // switch(state)
3884
 
3829
 
6427
  */
6372
  */
6428
 inline void gcode_M211() {
6373
 inline void gcode_M211() {
6429
   SERIAL_ECHO_START;
6374
   SERIAL_ECHO_START;
6430
-  #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
6375
+  #if HAS_SOFTWARE_ENDSTOPS
6431
     if (code_seen('S')) soft_endstops_enabled = code_value_bool();
6376
     if (code_seen('S')) soft_endstops_enabled = code_value_bool();
6432
-  #endif
6433
-  #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
6434
     SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS);
6377
     SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS);
6435
     serialprintPGM(soft_endstops_enabled ? PSTR(MSG_ON) : PSTR(MSG_OFF));
6378
     serialprintPGM(soft_endstops_enabled ? PSTR(MSG_ON) : PSTR(MSG_OFF));
6436
   #else
6379
   #else
7946
               && (delayed_move_time || current_position[X_AXIS] != xhome)
7889
               && (delayed_move_time || current_position[X_AXIS] != xhome)
7947
           ) {
7890
           ) {
7948
             float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT;
7891
             float raised_z = current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT;
7949
-            #if ENABLED(max_software_endstops)
7892
+            #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
7950
               NOMORE(raised_z, soft_endstop_max[Z_AXIS]);
7893
               NOMORE(raised_z, soft_endstop_max[Z_AXIS]);
7951
             #endif
7894
             #endif
7952
             #if ENABLED(DEBUG_LEVELING_FEATURE)
7895
             #if ENABLED(DEBUG_LEVELING_FEATURE)
7997
               // record raised toolhead position for use by unpark
7940
               // record raised toolhead position for use by unpark
7998
               COPY(raised_parked_position, current_position);
7941
               COPY(raised_parked_position, current_position);
7999
               raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
7942
               raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
8000
-              #if ENABLED(max_software_endstops)
7943
+              #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
8001
                 NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
7944
                 NOMORE(raised_parked_position[Z_AXIS], soft_endstop_max[Z_AXIS]);
8002
               #endif
7945
               #endif
8003
               active_extruder_parked = true;
7946
               active_extruder_parked = true;
9033
   SERIAL_EOL;
8976
   SERIAL_EOL;
9034
 }
8977
 }
9035
 
8978
 
9036
-#if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
8979
+#if HAS_SOFTWARE_ENDSTOPS
9037
 
8980
 
9038
   /**
8981
   /**
9039
    * Constrain the given coordinates to the software endstops.
8982
    * Constrain the given coordinates to the software endstops.
9040
    */
8983
    */
9041
   void clamp_to_software_endstops(float target[XYZ]) {
8984
   void clamp_to_software_endstops(float target[XYZ]) {
9042
-    #if ENABLED(min_software_endstops)
8985
+    if (!soft_endstops_enabled) return;
8986
+    #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
9043
       NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
8987
       NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
9044
       NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
8988
       NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
9045
       NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
8989
       NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
9046
     #endif
8990
     #endif
9047
-    #if ENABLED(max_software_endstops)
8991
+    #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
9048
       NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
8992
       NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
9049
       NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
8993
       NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
9050
       NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);
8994
       NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);

+ 4
- 0
Marlin/SanityCheck.h Bestand weergeven

130
   #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
130
   #error "Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
131
 #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
131
 #elif defined(Z_PROBE_DEPLOY_HEIGHT) || defined(Z_PROBE_TRAVEL_HEIGHT)
132
   #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
132
   #error "Z_PROBE_DEPLOY_HEIGHT and Z_PROBE_TRAVEL_HEIGHT are now Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES. Please update your configuration."
133
+#elif defined(MESH_HOME_SEARCH_Z)
134
+  #error "MESH_HOME_SEARCH_Z is now MANUAL_PROBE_Z_RANGE. Please update your configuration."
133
 #elif !defined(MIN_STEPS_PER_SEGMENT)
135
 #elif !defined(MIN_STEPS_PER_SEGMENT)
134
   #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
136
   #error Please replace "const int dropsegments" with "#define MIN_STEPS_PER_SEGMENT" (and increase by 1) in Configuration_adv.h.
135
 #elif defined(PREVENT_DANGEROUS_EXTRUDE)
137
 #elif defined(PREVENT_DANGEROUS_EXTRUDE)
156
   #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
158
   #error "LCD_PIN_RESET is now LCD_RESET_PIN. Please update your pins definitions."
157
 #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
159
 #elif defined(EXTRUDER_0_AUTO_FAN_PIN) || defined(EXTRUDER_1_AUTO_FAN_PIN) || defined(EXTRUDER_2_AUTO_FAN_PIN) || defined(EXTRUDER_3_AUTO_FAN_PIN)
158
   #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
160
   #error "EXTRUDER_[0123]_AUTO_FAN_PIN is now E[0123]_AUTO_FAN_PIN. Please update your Configuration_adv.h."
161
+#elif defined(min_software_endstops) || defined(max_software_endstops)
162
+  #error "(min|max)_software_endstops are now (MIN|MAX)_SOFTWARE_ENDSTOPS. Please update your configuration."
159
 #endif
163
 #endif
160
 
164
 
161
 /**
165
 /**

+ 7
- 14
Marlin/enum.h Bestand weergeven

164
   };
164
   };
165
 #endif
165
 #endif
166
 
166
 
167
-#if ENABLED(MESH_BED_LEVELING)
168
-  enum MeshLevelingState {
169
-    MeshReport,
170
-    MeshStart,
171
-    MeshNext,
172
-    MeshSet,
173
-    MeshSetZOffset,
174
-    MeshReset
175
-  };
176
-
177
-  enum MBLStatus {
178
-    MBL_STATUS_NONE = 0,
179
-    MBL_STATUS_HAS_MESH_BIT = 0,
180
-    MBL_STATUS_ACTIVE_BIT = 1
167
+#if ENABLED(PROBE_MANUALLY)
168
+  enum ABLState {
169
+    ABLReport,
170
+    ABLStart,
171
+    ABLNext,
172
+    ABLSet,
173
+    ABLReset
181
   };
174
   };
182
 #endif
175
 #endif
183
 
176
 

+ 9
- 8
Marlin/example_configurations/Cartesio/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 270
721
 #define Y_MAX_POS 270
726
 #define Z_MAX_POS 400
722
 #define Z_MAX_POS 400
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 8
- 7
Marlin/example_configurations/Felix/Configuration.h Bestand weergeven

688
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
688
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
689
                              // Be sure you have this distance over your Z_MAX_POS in case.
689
                              // Be sure you have this distance over your Z_MAX_POS in case.
690
 
690
 
691
-// ENDSTOP SETTINGS:
692
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
691
+// Direction of endstops when homing; 1=MAX, -1=MIN
693
 // :[-1, 1]
692
 // :[-1, 1]
694
 #define X_HOME_DIR -1
693
 #define X_HOME_DIR -1
695
 #define Y_HOME_DIR -1
694
 #define Y_HOME_DIR -1
696
 #define Z_HOME_DIR -1
695
 #define Z_HOME_DIR -1
697
 
696
 
698
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
699
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
700
-
701
 // @section machine
697
 // @section machine
702
 
698
 
703
 // Travel limits after homing (units are in mm)
699
 // Travel limits after homing (units are in mm)
708
 #define Y_MAX_POS 205
704
 #define Y_MAX_POS 205
709
 #define Z_MAX_POS 235
705
 #define Z_MAX_POS 235
710
 
706
 
707
+// If enabled, axes won't move below MIN_POS in response to movement commands.
708
+#define MIN_SOFTWARE_ENDSTOPS
709
+// If enabled, axes won't move above MAX_POS in response to movement commands.
710
+#define MAX_SOFTWARE_ENDSTOPS
711
+
711
 /**
712
 /**
712
  * Filament Runout Sensor
713
  * Filament Runout Sensor
713
  * A mechanical or opto endstop is used to check for the presence of filament.
714
  * A mechanical or opto endstop is used to check for the presence of filament.
733
   #define MESH_INSET 10        // Mesh inset margin on print area
734
   #define MESH_INSET 10        // Mesh inset margin on print area
734
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
735
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
735
   #define MESH_NUM_Y_POINTS 3
736
   #define MESH_NUM_Y_POINTS 3
736
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
737
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
737
 
738
 
738
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
739
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
739
 
740
 
740
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
741
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
741
 
742
 

+ 9
- 8
Marlin/example_configurations/Felix/DUAL/Configuration.h Bestand weergeven

688
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
688
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
689
                              // Be sure you have this distance over your Z_MAX_POS in case.
689
                              // Be sure you have this distance over your Z_MAX_POS in case.
690
 
690
 
691
-// ENDSTOP SETTINGS:
692
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
693
-// :[-1, 1]
691
+// Direction of endstops when homing; 1=MAX, -1=MIN
692
+// :[-1,1]
694
 #define X_HOME_DIR -1
693
 #define X_HOME_DIR -1
695
 #define Y_HOME_DIR -1
694
 #define Y_HOME_DIR -1
696
 #define Z_HOME_DIR -1
695
 #define Z_HOME_DIR -1
697
 
696
 
698
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
699
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
700
-
701
 // @section machine
697
 // @section machine
702
 
698
 
703
 // Travel limits after homing (units are in mm)
699
 // Travel limits after homing (units are in mm)
708
 #define Y_MAX_POS 205
704
 #define Y_MAX_POS 205
709
 #define Z_MAX_POS 235
705
 #define Z_MAX_POS 235
710
 
706
 
707
+// If enabled, axes won't move below MIN_POS in response to movement commands.
708
+#define MIN_SOFTWARE_ENDSTOPS
709
+// If enabled, axes won't move above MAX_POS in response to movement commands.
710
+#define MAX_SOFTWARE_ENDSTOPS
711
+
711
 /**
712
 /**
712
  * Filament Runout Sensor
713
  * Filament Runout Sensor
713
  * A mechanical or opto endstop is used to check for the presence of filament.
714
  * A mechanical or opto endstop is used to check for the presence of filament.
733
   #define MESH_INSET 10        // Mesh inset margin on print area
734
   #define MESH_INSET 10        // Mesh inset margin on print area
734
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
735
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
735
   #define MESH_NUM_Y_POINTS 3
736
   #define MESH_NUM_Y_POINTS 3
736
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
737
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
737
 
738
 
738
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
739
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
739
 
740
 
740
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
741
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
741
 
742
 

+ 9
- 8
Marlin/example_configurations/Hephestos/Configuration.h Bestand weergeven

697
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
697
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
698
                              // Be sure you have this distance over your Z_MAX_POS in case.
698
                              // Be sure you have this distance over your Z_MAX_POS in case.
699
 
699
 
700
-// ENDSTOP SETTINGS:
701
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
702
-// :[-1, 1]
700
+// Direction of endstops when homing; 1=MAX, -1=MIN
701
+// :[-1,1]
703
 #define X_HOME_DIR -1
702
 #define X_HOME_DIR -1
704
 #define Y_HOME_DIR -1
703
 #define Y_HOME_DIR -1
705
 #define Z_HOME_DIR -1
704
 #define Z_HOME_DIR -1
706
 
705
 
707
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
708
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
709
-
710
 // @section machine
706
 // @section machine
711
 
707
 
712
 // Travel limits after homing (units are in mm)
708
 // Travel limits after homing (units are in mm)
717
 #define Y_MAX_POS 210
713
 #define Y_MAX_POS 210
718
 #define Z_MAX_POS 180
714
 #define Z_MAX_POS 180
719
 
715
 
716
+// If enabled, axes won't move below MIN_POS in response to movement commands.
717
+#define MIN_SOFTWARE_ENDSTOPS
718
+// If enabled, axes won't move above MAX_POS in response to movement commands.
719
+#define MAX_SOFTWARE_ENDSTOPS
720
+
720
 /**
721
 /**
721
  * Filament Runout Sensor
722
  * Filament Runout Sensor
722
  * A mechanical or opto endstop is used to check for the presence of filament.
723
  * A mechanical or opto endstop is used to check for the presence of filament.
742
   #define MESH_INSET 10        // Mesh inset margin on print area
743
   #define MESH_INSET 10        // Mesh inset margin on print area
743
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
744
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
744
   #define MESH_NUM_Y_POINTS 3
745
   #define MESH_NUM_Y_POINTS 3
745
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
746
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
746
 
747
 
747
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
748
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
748
 
749
 
749
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
750
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
750
 
751
 

+ 9
- 8
Marlin/example_configurations/Hephestos_2/Configuration.h Bestand weergeven

699
 #define Z_HOMING_HEIGHT 5    // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
699
 #define Z_HOMING_HEIGHT 5    // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
700
                              // Be sure you have this distance over your Z_MAX_POS in case.
700
                              // Be sure you have this distance over your Z_MAX_POS in case.
701
 
701
 
702
-// ENDSTOP SETTINGS:
703
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
704
-// :[-1, 1]
702
+// Direction of endstops when homing; 1=MAX, -1=MIN
703
+// :[-1,1]
705
 #define X_HOME_DIR -1
704
 #define X_HOME_DIR -1
706
 #define Y_HOME_DIR -1
705
 #define Y_HOME_DIR -1
707
 #define Z_HOME_DIR -1
706
 #define Z_HOME_DIR -1
708
 
707
 
709
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
710
-#define max_software_endstops true // If true, axis won't move to coordinates greater than the defined lengths below.
711
-
712
 // @section machine
708
 // @section machine
713
 
709
 
714
 // Travel limits after homing (units are in mm)
710
 // Travel limits after homing (units are in mm)
719
 #define Y_MAX_POS 297
715
 #define Y_MAX_POS 297
720
 #define Z_MAX_POS 210
716
 #define Z_MAX_POS 210
721
 
717
 
718
+// If enabled, axes won't move below MIN_POS in response to movement commands.
719
+#define MIN_SOFTWARE_ENDSTOPS
720
+// If enabled, axes won't move above MAX_POS in response to movement commands.
721
+#define MAX_SOFTWARE_ENDSTOPS
722
+
722
 /**
723
 /**
723
  * Filament Runout Sensor
724
  * Filament Runout Sensor
724
  * A mechanical or opto endstop is used to check for the presence of filament.
725
  * A mechanical or opto endstop is used to check for the presence of filament.
744
   #define MESH_INSET 10        // Mesh inset margin on print area
745
   #define MESH_INSET 10        // Mesh inset margin on print area
745
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
746
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
746
   #define MESH_NUM_Y_POINTS 3
747
   #define MESH_NUM_Y_POINTS 3
747
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
748
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
748
 
749
 
749
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
750
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
750
 
751
 
751
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
752
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
752
 
753
 

+ 9
- 8
Marlin/example_configurations/K8200/Configuration.h Bestand weergeven

734
 #define Z_HOMING_HEIGHT 4   // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
734
 #define Z_HOMING_HEIGHT 4   // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
735
                             // Be sure you have this distance over your Z_MAX_POS in case.
735
                             // Be sure you have this distance over your Z_MAX_POS in case.
736
 
736
 
737
-// ENDSTOP SETTINGS:
738
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
739
-// :[-1, 1]
737
+// Direction of endstops when homing; 1=MAX, -1=MIN
738
+// :[-1,1]
740
 #define X_HOME_DIR -1
739
 #define X_HOME_DIR -1
741
 #define Y_HOME_DIR -1
740
 #define Y_HOME_DIR -1
742
 #define Z_HOME_DIR -1
741
 #define Z_HOME_DIR -1
743
 
742
 
744
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
745
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
746
-
747
 // @section machine
743
 // @section machine
748
 
744
 
749
 // Travel limits after homing (units are in mm)
745
 // Travel limits after homing (units are in mm)
754
 #define Y_MAX_POS 200
750
 #define Y_MAX_POS 200
755
 #define Z_MAX_POS 200
751
 #define Z_MAX_POS 200
756
 
752
 
753
+// If enabled, axes won't move below MIN_POS in response to movement commands.
754
+#define MIN_SOFTWARE_ENDSTOPS
755
+// If enabled, axes won't move above MAX_POS in response to movement commands.
756
+#define MAX_SOFTWARE_ENDSTOPS
757
+
757
 /**
758
 /**
758
  * Filament Runout Sensor
759
  * Filament Runout Sensor
759
  * A mechanical or opto endstop is used to check for the presence of filament.
760
  * A mechanical or opto endstop is used to check for the presence of filament.
779
   #define MESH_INSET 10        // Mesh inset margin on print area
780
   #define MESH_INSET 10        // Mesh inset margin on print area
780
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
781
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
781
   #define MESH_NUM_Y_POINTS 3
782
   #define MESH_NUM_Y_POINTS 3
782
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
783
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
783
 
784
 
784
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
785
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
785
 
786
 
786
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
787
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
787
 
788
 

+ 9
- 8
Marlin/example_configurations/K8400/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 200
721
 #define Y_MAX_POS 200
726
 #define Z_MAX_POS 190
722
 #define Z_MAX_POS 190
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 9
- 8
Marlin/example_configurations/K8400/Dual-head/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 200
721
 #define Y_MAX_POS 200
726
 #define Z_MAX_POS 190
722
 #define Z_MAX_POS 190
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 9
- 8
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 200
721
 #define Y_MAX_POS 200
726
 #define Z_MAX_POS 200
722
 #define Z_MAX_POS 200
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 9
- 8
Marlin/example_configurations/RigidBot/Configuration.h Bestand weergeven

704
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
704
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
                              // Be sure you have this distance over your Z_MAX_POS in case.
705
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
 
706
 
707
-// ENDSTOP SETTINGS:
708
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
709
-// :[-1, 1]
707
+// Direction of endstops when homing; 1=MAX, -1=MIN
708
+// :[-1,1]
710
 #define X_HOME_DIR -1
709
 #define X_HOME_DIR -1
711
 #define Y_HOME_DIR -1
710
 #define Y_HOME_DIR -1
712
 #define Z_HOME_DIR -1
711
 #define Z_HOME_DIR -1
713
 
712
 
714
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
715
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
716
-
717
 // @section machine
713
 // @section machine
718
 
714
 
719
 // Travel limits after homing (units are in mm)
715
 // Travel limits after homing (units are in mm)
724
 #define Y_MAX_POS 248  // RigidBot regular is 248mm, RigitBot Big is 304mm
720
 #define Y_MAX_POS 248  // RigidBot regular is 248mm, RigitBot Big is 304mm
725
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
721
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
726
 
722
 
723
+// If enabled, axes won't move below MIN_POS in response to movement commands.
724
+#define MIN_SOFTWARE_ENDSTOPS
725
+// If enabled, axes won't move above MAX_POS in response to movement commands.
726
+#define MAX_SOFTWARE_ENDSTOPS
727
+
727
 /**
728
 /**
728
  * Filament Runout Sensor
729
  * Filament Runout Sensor
729
  * A mechanical or opto endstop is used to check for the presence of filament.
730
  * A mechanical or opto endstop is used to check for the presence of filament.
749
   #define MESH_INSET 10        // Mesh inset margin on print area
750
   #define MESH_INSET 10        // Mesh inset margin on print area
750
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
751
   #define MESH_NUM_Y_POINTS 3
752
   #define MESH_NUM_Y_POINTS 3
752
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
753
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
753
 
754
 
754
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
755
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
755
 
756
 
756
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
757
 
758
 

+ 9
- 8
Marlin/example_configurations/SCARA/Configuration.h Bestand weergeven

720
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
720
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
721
                              // Be sure you have this distance over your Z_MAX_POS in case.
721
                              // Be sure you have this distance over your Z_MAX_POS in case.
722
 
722
 
723
-// ENDSTOP SETTINGS:
724
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
725
-// :[-1, 1]
723
+// Direction of endstops when homing; 1=MAX, -1=MIN
724
+// :[-1,1]
726
 #define X_HOME_DIR 1
725
 #define X_HOME_DIR 1
727
 #define Y_HOME_DIR 1
726
 #define Y_HOME_DIR 1
728
 #define Z_HOME_DIR -1
727
 #define Z_HOME_DIR -1
729
 
728
 
730
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
731
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
732
-
733
 // @section machine
729
 // @section machine
734
 
730
 
735
 // Travel limits after homing (units are in mm)
731
 // Travel limits after homing (units are in mm)
740
 #define Y_MAX_POS 200
736
 #define Y_MAX_POS 200
741
 #define Z_MAX_POS 225
737
 #define Z_MAX_POS 225
742
 
738
 
739
+// If enabled, axes won't move below MIN_POS in response to movement commands.
740
+#define MIN_SOFTWARE_ENDSTOPS
741
+// If enabled, axes won't move above MAX_POS in response to movement commands.
742
+#define MAX_SOFTWARE_ENDSTOPS
743
+
743
 /**
744
 /**
744
  * Filament Runout Sensor
745
  * Filament Runout Sensor
745
  * A mechanical or opto endstop is used to check for the presence of filament.
746
  * A mechanical or opto endstop is used to check for the presence of filament.
765
   #define MESH_INSET 10        // Mesh inset margin on print area
766
   #define MESH_INSET 10        // Mesh inset margin on print area
766
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
767
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
767
   #define MESH_NUM_Y_POINTS 3
768
   #define MESH_NUM_Y_POINTS 3
768
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
769
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
769
 
770
 
770
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
771
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
771
 
772
 
772
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
773
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
773
 
774
 

+ 9
- 8
Marlin/example_configurations/TAZ4/Configuration.h Bestand weergeven

726
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
726
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
727
                              // Be sure you have this distance over your Z_MAX_POS in case.
727
                              // Be sure you have this distance over your Z_MAX_POS in case.
728
 
728
 
729
-// ENDSTOP SETTINGS:
730
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
731
-// :[-1, 1]
729
+// Direction of endstops when homing; 1=MAX, -1=MIN
730
+// :[-1,1]
732
 #define X_HOME_DIR -1
731
 #define X_HOME_DIR -1
733
 #define Y_HOME_DIR -1
732
 #define Y_HOME_DIR -1
734
 #define Z_HOME_DIR -1
733
 #define Z_HOME_DIR -1
735
 
734
 
736
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
737
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
738
-
739
 // @section machine
735
 // @section machine
740
 
736
 
741
 // Travel limits after homing (units are in mm)
737
 // Travel limits after homing (units are in mm)
746
 #define Y_MAX_POS 275
742
 #define Y_MAX_POS 275
747
 #define Z_MAX_POS 250
743
 #define Z_MAX_POS 250
748
 
744
 
745
+// If enabled, axes won't move below MIN_POS in response to movement commands.
746
+#define MIN_SOFTWARE_ENDSTOPS
747
+// If enabled, axes won't move above MAX_POS in response to movement commands.
748
+#define MAX_SOFTWARE_ENDSTOPS
749
+
749
 /**
750
 /**
750
  * Filament Runout Sensor
751
  * Filament Runout Sensor
751
  * A mechanical or opto endstop is used to check for the presence of filament.
752
  * A mechanical or opto endstop is used to check for the presence of filament.
771
   #define MESH_INSET 10        // Mesh inset margin on print area
772
   #define MESH_INSET 10        // Mesh inset margin on print area
772
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
773
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
773
   #define MESH_NUM_Y_POINTS 3
774
   #define MESH_NUM_Y_POINTS 3
774
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
775
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
775
 
776
 
776
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
777
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
777
 
778
 
778
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
779
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
779
 
780
 

+ 9
- 8
Marlin/example_configurations/WITBOX/Configuration.h Bestand weergeven

697
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
697
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
698
                              // Be sure you have this distance over your Z_MAX_POS in case.
698
                              // Be sure you have this distance over your Z_MAX_POS in case.
699
 
699
 
700
-// ENDSTOP SETTINGS:
701
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
702
-// :[-1, 1]
700
+// Direction of endstops when homing; 1=MAX, -1=MIN
701
+// :[-1,1]
703
 #define X_HOME_DIR 1
702
 #define X_HOME_DIR 1
704
 #define Y_HOME_DIR 1
703
 #define Y_HOME_DIR 1
705
 #define Z_HOME_DIR -1
704
 #define Z_HOME_DIR -1
706
 
705
 
707
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
708
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
709
-
710
 // @section machine
706
 // @section machine
711
 
707
 
712
 // Travel limits after homing (units are in mm)
708
 // Travel limits after homing (units are in mm)
717
 #define Y_MAX_POS 210
713
 #define Y_MAX_POS 210
718
 #define Z_MAX_POS 200
714
 #define Z_MAX_POS 200
719
 
715
 
716
+// If enabled, axes won't move below MIN_POS in response to movement commands.
717
+#define MIN_SOFTWARE_ENDSTOPS
718
+// If enabled, axes won't move above MAX_POS in response to movement commands.
719
+#define MAX_SOFTWARE_ENDSTOPS
720
+
720
 /**
721
 /**
721
  * Filament Runout Sensor
722
  * Filament Runout Sensor
722
  * A mechanical or opto endstop is used to check for the presence of filament.
723
  * A mechanical or opto endstop is used to check for the presence of filament.
742
   #define MESH_INSET 10        // Mesh inset margin on print area
743
   #define MESH_INSET 10        // Mesh inset margin on print area
743
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
744
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
744
   #define MESH_NUM_Y_POINTS 3
745
   #define MESH_NUM_Y_POINTS 3
745
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
746
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
746
 
747
 
747
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
748
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
748
 
749
 
749
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
750
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
750
 
751
 

+ 9
- 8
Marlin/example_configurations/adafruit/ST7565/Configuration.h Bestand weergeven

705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
705
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
706
                              // Be sure you have this distance over your Z_MAX_POS in case.
707
 
707
 
708
-// ENDSTOP SETTINGS:
709
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
710
-// :[-1, 1]
708
+// Direction of endstops when homing; 1=MAX, -1=MIN
709
+// :[-1,1]
711
 #define X_HOME_DIR -1
710
 #define X_HOME_DIR -1
712
 #define Y_HOME_DIR -1
711
 #define Y_HOME_DIR -1
713
 #define Z_HOME_DIR -1
712
 #define Z_HOME_DIR -1
714
 
713
 
715
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
716
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
717
-
718
 // @section machine
714
 // @section machine
719
 
715
 
720
 // Travel limits after homing (units are in mm)
716
 // Travel limits after homing (units are in mm)
725
 #define Y_MAX_POS 200
721
 #define Y_MAX_POS 200
726
 #define Z_MAX_POS 200
722
 #define Z_MAX_POS 200
727
 
723
 
724
+// If enabled, axes won't move below MIN_POS in response to movement commands.
725
+#define MIN_SOFTWARE_ENDSTOPS
726
+// If enabled, axes won't move above MAX_POS in response to movement commands.
727
+#define MAX_SOFTWARE_ENDSTOPS
728
+
728
 /**
729
 /**
729
  * Filament Runout Sensor
730
  * Filament Runout Sensor
730
  * A mechanical or opto endstop is used to check for the presence of filament.
731
  * A mechanical or opto endstop is used to check for the presence of filament.
750
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_INSET 10        // Mesh inset margin on print area
751
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
752
   #define MESH_NUM_Y_POINTS 3
753
   #define MESH_NUM_Y_POINTS 3
753
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
754
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
754
 
755
 
755
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
756
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
756
 
757
 
757
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
758
 
759
 

+ 9
- 8
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h Bestand weergeven

807
 #define Z_HOMING_HEIGHT 15   // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
807
 #define Z_HOMING_HEIGHT 15   // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
808
                              // Be sure you have this distance over your Z_MAX_POS in case.
808
                              // Be sure you have this distance over your Z_MAX_POS in case.
809
 
809
 
810
-// ENDSTOP SETTINGS:
811
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
812
-// :[-1, 1]
810
+// Direction of endstops when homing; 1=MAX, -1=MIN
811
+// :[-1,1]
813
 #define X_HOME_DIR 1  // deltas always home to max
812
 #define X_HOME_DIR 1  // deltas always home to max
814
 #define Y_HOME_DIR 1
813
 #define Y_HOME_DIR 1
815
 #define Z_HOME_DIR 1
814
 #define Z_HOME_DIR 1
816
 
815
 
817
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
818
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
819
-
820
 // @section machine
816
 // @section machine
821
 
817
 
822
 // Travel limits after homing (units are in mm)
818
 // Travel limits after homing (units are in mm)
827
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
823
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
828
 #define Z_MAX_POS MANUAL_Z_HOME_POS
824
 #define Z_MAX_POS MANUAL_Z_HOME_POS
829
 
825
 
826
+// If enabled, axes won't move below MIN_POS in response to movement commands.
827
+#define MIN_SOFTWARE_ENDSTOPS
828
+// If enabled, axes won't move above MAX_POS in response to movement commands.
829
+#define MAX_SOFTWARE_ENDSTOPS
830
+
830
 /**
831
 /**
831
  * Filament Runout Sensor
832
  * Filament Runout Sensor
832
  * A mechanical or opto endstop is used to check for the presence of filament.
833
  * A mechanical or opto endstop is used to check for the presence of filament.
853
   #define MESH_INSET 10        // Mesh inset margin on print area
854
   #define MESH_INSET 10        // Mesh inset margin on print area
854
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
855
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
855
   #define MESH_NUM_Y_POINTS 3
856
   #define MESH_NUM_Y_POINTS 3
856
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
857
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
857
 
858
 
858
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
859
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
859
 
860
 
860
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
861
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
861
 
862
 

+ 9
- 8
Marlin/example_configurations/delta/generic/Configuration.h Bestand weergeven

791
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
791
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
792
                              // Be sure you have this distance over your Z_MAX_POS in case.
792
                              // Be sure you have this distance over your Z_MAX_POS in case.
793
 
793
 
794
-// ENDSTOP SETTINGS:
795
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
796
-// :[-1, 1]
794
+// Direction of endstops when homing; 1=MAX, -1=MIN
795
+// :[-1,1]
797
 #define X_HOME_DIR 1  // deltas always home to max
796
 #define X_HOME_DIR 1  // deltas always home to max
798
 #define Y_HOME_DIR 1
797
 #define Y_HOME_DIR 1
799
 #define Z_HOME_DIR 1
798
 #define Z_HOME_DIR 1
800
 
799
 
801
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
802
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
803
-
804
 // @section machine
800
 // @section machine
805
 
801
 
806
 // Travel limits after homing (units are in mm)
802
 // Travel limits after homing (units are in mm)
811
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
807
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
812
 #define Z_MAX_POS MANUAL_Z_HOME_POS
808
 #define Z_MAX_POS MANUAL_Z_HOME_POS
813
 
809
 
810
+// If enabled, axes won't move below MIN_POS in response to movement commands.
811
+#define MIN_SOFTWARE_ENDSTOPS
812
+// If enabled, axes won't move above MAX_POS in response to movement commands.
813
+#define MAX_SOFTWARE_ENDSTOPS
814
+
814
 /**
815
 /**
815
  * Filament Runout Sensor
816
  * Filament Runout Sensor
816
  * A mechanical or opto endstop is used to check for the presence of filament.
817
  * A mechanical or opto endstop is used to check for the presence of filament.
836
   #define MESH_INSET 10        // Mesh inset margin on print area
837
   #define MESH_INSET 10        // Mesh inset margin on print area
837
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
838
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
838
   #define MESH_NUM_Y_POINTS 3
839
   #define MESH_NUM_Y_POINTS 3
839
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
840
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
840
 
841
 
841
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
842
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
842
 
843
 
843
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
844
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
844
 
845
 

+ 9
- 8
Marlin/example_configurations/delta/kossel_mini/Configuration.h Bestand weergeven

794
 //#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
794
 //#define Z_HOMING_HEIGHT 15 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
795
                              // Be sure you have this distance over your Z_MAX_POS in case.
795
                              // Be sure you have this distance over your Z_MAX_POS in case.
796
 
796
 
797
-// ENDSTOP SETTINGS:
798
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
799
-// :[-1, 1]
797
+// Direction of endstops when homing; 1=MAX, -1=MIN
798
+// :[-1,1]
800
 #define X_HOME_DIR 1  // deltas always home to max
799
 #define X_HOME_DIR 1  // deltas always home to max
801
 #define Y_HOME_DIR 1
800
 #define Y_HOME_DIR 1
802
 #define Z_HOME_DIR 1
801
 #define Z_HOME_DIR 1
803
 
802
 
804
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
805
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
806
-
807
 // @section machine
803
 // @section machine
808
 
804
 
809
 // Travel limits after homing (units are in mm)
805
 // Travel limits after homing (units are in mm)
814
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
810
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
815
 #define Z_MAX_POS MANUAL_Z_HOME_POS
811
 #define Z_MAX_POS MANUAL_Z_HOME_POS
816
 
812
 
813
+// If enabled, axes won't move below MIN_POS in response to movement commands.
814
+#define MIN_SOFTWARE_ENDSTOPS
815
+// If enabled, axes won't move above MAX_POS in response to movement commands.
816
+#define MAX_SOFTWARE_ENDSTOPS
817
+
817
 /**
818
 /**
818
  * Filament Runout Sensor
819
  * Filament Runout Sensor
819
  * A mechanical or opto endstop is used to check for the presence of filament.
820
  * A mechanical or opto endstop is used to check for the presence of filament.
839
   #define MESH_INSET 10        // Mesh inset margin on print area
840
   #define MESH_INSET 10        // Mesh inset margin on print area
840
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
841
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
841
   #define MESH_NUM_Y_POINTS 3
842
   #define MESH_NUM_Y_POINTS 3
842
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
843
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
843
 
844
 
844
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
845
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
845
 
846
 
846
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
847
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
847
 
848
 

+ 9
- 8
Marlin/example_configurations/delta/kossel_pro/Configuration.h Bestand weergeven

793
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
793
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
794
                              // Be sure you have this distance over your Z_MAX_POS in case.
794
                              // Be sure you have this distance over your Z_MAX_POS in case.
795
 
795
 
796
-// ENDSTOP SETTINGS:
797
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
798
-// :[-1, 1]
796
+// Direction of endstops when homing; 1=MAX, -1=MIN
797
+// :[-1,1]
799
 #define X_HOME_DIR 1  // deltas always home to max
798
 #define X_HOME_DIR 1  // deltas always home to max
800
 #define Y_HOME_DIR 1
799
 #define Y_HOME_DIR 1
801
 #define Z_HOME_DIR 1
800
 #define Z_HOME_DIR 1
802
 
801
 
803
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
804
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
805
-
806
 // @section machine
802
 // @section machine
807
 
803
 
808
 // Travel limits after homing (units are in mm)
804
 // Travel limits after homing (units are in mm)
813
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
809
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
814
 #define Z_MAX_POS MANUAL_Z_HOME_POS
810
 #define Z_MAX_POS MANUAL_Z_HOME_POS
815
 
811
 
812
+// If enabled, axes won't move below MIN_POS in response to movement commands.
813
+#define MIN_SOFTWARE_ENDSTOPS
814
+// If enabled, axes won't move above MAX_POS in response to movement commands.
815
+#define MAX_SOFTWARE_ENDSTOPS
816
+
816
 /**
817
 /**
817
  * Filament Runout Sensor
818
  * Filament Runout Sensor
818
  * A mechanical or opto endstop is used to check for the presence of filament.
819
  * A mechanical or opto endstop is used to check for the presence of filament.
838
   #define MESH_INSET 10        // Mesh inset margin on print area
839
   #define MESH_INSET 10        // Mesh inset margin on print area
839
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
840
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
840
   #define MESH_NUM_Y_POINTS 3
841
   #define MESH_NUM_Y_POINTS 3
841
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
842
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
842
 
843
 
843
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
844
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
844
 
845
 
845
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
846
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
846
 
847
 

+ 9
- 8
Marlin/example_configurations/delta/kossel_xl/Configuration.h Bestand weergeven

797
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
797
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
798
                              // Be sure you have this distance over your Z_MAX_POS in case.
798
                              // Be sure you have this distance over your Z_MAX_POS in case.
799
 
799
 
800
-// ENDSTOP SETTINGS:
801
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
802
-// :[-1, 1]
800
+// Direction of endstops when homing; 1=MAX, -1=MIN
801
+// :[-1,1]
803
 #define X_HOME_DIR 1  // deltas always home to max
802
 #define X_HOME_DIR 1  // deltas always home to max
804
 #define Y_HOME_DIR 1
803
 #define Y_HOME_DIR 1
805
 #define Z_HOME_DIR 1
804
 #define Z_HOME_DIR 1
806
 
805
 
807
-#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS.
808
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
809
-
810
 // @section machine
806
 // @section machine
811
 
807
 
812
 // Travel limits after homing (units are in mm)
808
 // Travel limits after homing (units are in mm)
817
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
813
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
818
 #define Z_MAX_POS MANUAL_Z_HOME_POS
814
 #define Z_MAX_POS MANUAL_Z_HOME_POS
819
 
815
 
816
+// If enabled, axes won't move below MIN_POS in response to movement commands.
817
+//#define MIN_SOFTWARE_ENDSTOPS
818
+// If enabled, axes won't move above MAX_POS in response to movement commands.
819
+#define MAX_SOFTWARE_ENDSTOPS
820
+
820
 /**
821
 /**
821
  * Filament Runout Sensor
822
  * Filament Runout Sensor
822
  * A mechanical or opto endstop is used to check for the presence of filament.
823
  * A mechanical or opto endstop is used to check for the presence of filament.
842
   #define MESH_INSET 10        // Mesh inset margin on print area
843
   #define MESH_INSET 10        // Mesh inset margin on print area
843
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
844
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
844
   #define MESH_NUM_Y_POINTS 3
845
   #define MESH_NUM_Y_POINTS 3
845
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
846
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
846
 
847
 
847
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
848
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
848
 
849
 
849
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
850
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
850
 
851
 

+ 9
- 8
Marlin/example_configurations/makibox/Configuration.h Bestand weergeven

708
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
708
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
709
                              // Be sure you have this distance over your Z_MAX_POS in case.
709
                              // Be sure you have this distance over your Z_MAX_POS in case.
710
 
710
 
711
-// ENDSTOP SETTINGS:
712
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
713
-// :[-1, 1]
711
+// Direction of endstops when homing; 1=MAX, -1=MIN
712
+// :[-1,1]
714
 #define X_HOME_DIR -1
713
 #define X_HOME_DIR -1
715
 #define Y_HOME_DIR -1
714
 #define Y_HOME_DIR -1
716
 #define Z_HOME_DIR -1
715
 #define Z_HOME_DIR -1
717
 
716
 
718
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
719
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
720
-
721
 // @section machine
717
 // @section machine
722
 
718
 
723
 // Travel limits after homing (units are in mm)
719
 // Travel limits after homing (units are in mm)
728
 #define Y_MAX_POS 150
724
 #define Y_MAX_POS 150
729
 #define Z_MAX_POS 86
725
 #define Z_MAX_POS 86
730
 
726
 
727
+// If enabled, axes won't move below MIN_POS in response to movement commands.
728
+#define MIN_SOFTWARE_ENDSTOPS
729
+// If enabled, axes won't move above MAX_POS in response to movement commands.
730
+#define MAX_SOFTWARE_ENDSTOPS
731
+
731
 /**
732
 /**
732
  * Filament Runout Sensor
733
  * Filament Runout Sensor
733
  * A mechanical or opto endstop is used to check for the presence of filament.
734
  * A mechanical or opto endstop is used to check for the presence of filament.
753
   #define MESH_INSET 10        // Mesh inset margin on print area
754
   #define MESH_INSET 10        // Mesh inset margin on print area
754
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
755
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
755
   #define MESH_NUM_Y_POINTS 3
756
   #define MESH_NUM_Y_POINTS 3
756
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
757
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
757
 
758
 
758
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
759
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
759
 
760
 
760
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
761
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
761
 
762
 

+ 9
- 8
Marlin/example_configurations/tvrrug/Round2/Configuration.h Bestand weergeven

701
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
701
 //#define Z_HOMING_HEIGHT 4  // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
702
                              // Be sure you have this distance over your Z_MAX_POS in case.
702
                              // Be sure you have this distance over your Z_MAX_POS in case.
703
 
703
 
704
-// ENDSTOP SETTINGS:
705
-// Sets direction of endstops when homing; 1=MAX, -1=MIN
706
-// :[-1, 1]
704
+// Direction of endstops when homing; 1=MAX, -1=MIN
705
+// :[-1,1]
707
 #define X_HOME_DIR -1
706
 #define X_HOME_DIR -1
708
 #define Y_HOME_DIR -1
707
 #define Y_HOME_DIR -1
709
 #define Z_HOME_DIR -1
708
 #define Z_HOME_DIR -1
710
 
709
 
711
-#define min_software_endstops true // If true, axis won't move to coordinates less than HOME_POS.
712
-#define max_software_endstops true  // If true, axis won't move to coordinates greater than the defined lengths below.
713
-
714
 // @section machine
710
 // @section machine
715
 
711
 
716
 // Travel limits after homing (units are in mm)
712
 // Travel limits after homing (units are in mm)
721
 #define Y_MAX_POS 205
717
 #define Y_MAX_POS 205
722
 #define Z_MAX_POS 120
718
 #define Z_MAX_POS 120
723
 
719
 
720
+// If enabled, axes won't move below MIN_POS in response to movement commands.
721
+#define MIN_SOFTWARE_ENDSTOPS
722
+// If enabled, axes won't move above MAX_POS in response to movement commands.
723
+#define MAX_SOFTWARE_ENDSTOPS
724
+
724
 /**
725
 /**
725
  * Filament Runout Sensor
726
  * Filament Runout Sensor
726
  * A mechanical or opto endstop is used to check for the presence of filament.
727
  * A mechanical or opto endstop is used to check for the presence of filament.
746
   #define MESH_INSET 10        // Mesh inset margin on print area
747
   #define MESH_INSET 10        // Mesh inset margin on print area
747
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
748
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
748
   #define MESH_NUM_Y_POINTS 3
749
   #define MESH_NUM_Y_POINTS 3
749
-  #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
750
+  #define MANUAL_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
750
 
751
 
751
-  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
752
+  //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
752
 
753
 
753
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
754
   //#define MANUAL_BED_LEVELING  // Add display menu option for bed leveling.
754
 
755
 

+ 19
- 0
Marlin/mesh_bed_leveling.h Bestand weergeven

23
 #include "Marlin.h"
23
 #include "Marlin.h"
24
 
24
 
25
 #if ENABLED(MESH_BED_LEVELING)
25
 #if ENABLED(MESH_BED_LEVELING)
26
+
27
+  enum MeshLevelingState {
28
+    MeshReport,
29
+    MeshStart,
30
+    MeshNext,
31
+    MeshSet,
32
+    MeshSetZOffset,
33
+    MeshReset
34
+  };
35
+
36
+  enum MBLStatus {
37
+    MBL_STATUS_NONE = 0,
38
+    MBL_STATUS_HAS_MESH_BIT = 0,
39
+    MBL_STATUS_ACTIVE_BIT = 1,
40
+    MBL_STATUS_REACTIVATE_BIT = 2
41
+  };
42
+
26
   #define MESH_X_DIST ((MESH_MAX_X - (MESH_MIN_X))/(MESH_NUM_X_POINTS - 1))
43
   #define MESH_X_DIST ((MESH_MAX_X - (MESH_MIN_X))/(MESH_NUM_X_POINTS - 1))
27
   #define MESH_Y_DIST ((MESH_MAX_Y - (MESH_MIN_Y))/(MESH_NUM_Y_POINTS - 1))
44
   #define MESH_Y_DIST ((MESH_MAX_Y - (MESH_MIN_Y))/(MESH_NUM_Y_POINTS - 1))
28
 
45
 
44
     void set_active(const bool onOff)   { onOff ? SBI(status, MBL_STATUS_ACTIVE_BIT) : CBI(status, MBL_STATUS_ACTIVE_BIT); }
61
     void set_active(const bool onOff)   { onOff ? SBI(status, MBL_STATUS_ACTIVE_BIT) : CBI(status, MBL_STATUS_ACTIVE_BIT); }
45
     bool has_mesh() const               { return TEST(status, MBL_STATUS_HAS_MESH_BIT); }
62
     bool has_mesh() const               { return TEST(status, MBL_STATUS_HAS_MESH_BIT); }
46
     void set_has_mesh(const bool onOff) { onOff ? SBI(status, MBL_STATUS_HAS_MESH_BIT) : CBI(status, MBL_STATUS_HAS_MESH_BIT); }
63
     void set_has_mesh(const bool onOff) { onOff ? SBI(status, MBL_STATUS_HAS_MESH_BIT) : CBI(status, MBL_STATUS_HAS_MESH_BIT); }
64
+    bool reactivate()                   { bool b = TEST(status, MBL_STATUS_REACTIVATE_BIT); CBI(status, MBL_STATUS_REACTIVATE_BIT); return b; }
65
+    void set_reactivate(const bool onOff) { onOff ? SBI(status, MBL_STATUS_REACTIVATE_BIT) : CBI(status, MBL_STATUS_REACTIVATE_BIT); }
47
 
66
 
48
     inline void zigzag(const int8_t index, int8_t &px, int8_t &py) const {
67
     inline void zigzag(const int8_t index, int8_t &px, int8_t &py) const {
49
       px = index % (MESH_NUM_X_POINTS);
68
       px = index % (MESH_NUM_X_POINTS);

+ 48
- 48
Marlin/ultralcd.cpp Bestand weergeven

1220
      *
1220
      *
1221
      */
1221
      */
1222
 
1222
 
1223
-    static uint8_t _lcd_level_bed_position;
1223
+    static uint8_t manual_probe_index;
1224
 
1224
 
1225
     // Utility to go to the next mesh point
1225
     // Utility to go to the next mesh point
1226
-    // A raise is added between points if Z_HOMING_HEIGHT is in use
1227
-    // Note: During Manual Bed Leveling the homed Z position is MESH_HOME_SEARCH_Z
1228
-    // Z position will be restored with the final action, a G28
1229
-    inline void _mbl_goto_xy(float x, float y) {
1226
+    inline void _manual_probe_xy(float x, float y) {
1230
       if (no_reentrance) return;
1227
       if (no_reentrance) return;
1231
-      current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT);
1232
-      line_to_current(Z_AXIS);
1228
+      #if MANUAL_PROBE_HEIGHT > 0
1229
+        current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
1230
+        line_to_current(Z_AXIS);
1231
+      #endif
1233
       current_position[X_AXIS] = LOGICAL_X_POSITION(x);
1232
       current_position[X_AXIS] = LOGICAL_X_POSITION(x);
1234
       current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
1233
       current_position[Y_AXIS] = LOGICAL_Y_POSITION(y);
1235
       planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
1234
       planner.buffer_line_kinematic(current_position, MMM_TO_MMS(XY_PROBE_SPEED), active_extruder);
1236
-      #if Z_HOMING_HEIGHT > 0
1237
-        current_position[Z_AXIS] = LOGICAL_Z_POSITION(MESH_HOME_SEARCH_Z);
1235
+      #if MANUAL_PROBE_HEIGHT > 0
1236
+        current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + 0.2;
1238
         line_to_current(Z_AXIS);
1237
         line_to_current(Z_AXIS);
1239
       #endif
1238
       #endif
1240
       lcd_synchronize();
1239
       lcd_synchronize();
1259
       if (encoderPosition) {
1258
       if (encoderPosition) {
1260
         refresh_cmd_timeout();
1259
         refresh_cmd_timeout();
1261
         current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP);
1260
         current_position[Z_AXIS] += float((int32_t)encoderPosition) * (MBL_Z_STEP);
1262
-        NOLESS(current_position[Z_AXIS], 0);
1263
-        NOMORE(current_position[Z_AXIS], MESH_HOME_SEARCH_Z * 2);
1261
+        NOLESS(current_position[Z_AXIS], -(MANUAL_PROBE_Z_RANGE) * 0.5);
1262
+        NOMORE(current_position[Z_AXIS], (MANUAL_PROBE_Z_RANGE) * 0.5);
1264
         line_to_current(Z_AXIS);
1263
         line_to_current(Z_AXIS);
1265
         lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
1264
         lcdDrawUpdate = LCDVIEW_KEEP_REDRAWING;
1266
         encoderPosition = 0;
1265
         encoderPosition = 0;
1267
       }
1266
       }
1268
 
1267
 
1269
-      static bool debounce_click = false;
1270
       if (lcd_clicked) {
1268
       if (lcd_clicked) {
1271
-        if (!debounce_click) {
1272
-          debounce_click = true; // ignore multiple "clicks" in a row
1273
-          mbl.set_zigzag_z(_lcd_level_bed_position++, current_position[Z_AXIS]);
1274
-          if (_lcd_level_bed_position == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
1275
-            lcd_goto_screen(_lcd_level_bed_done);
1269
+        mbl.set_zigzag_z(manual_probe_index++, current_position[Z_AXIS]);
1270
+        if (manual_probe_index == (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS)) {
1271
+          lcd_goto_screen(_lcd_level_bed_done);
1276
 
1272
 
1277
-            current_position[Z_AXIS] = MESH_HOME_SEARCH_Z + Z_HOMING_HEIGHT;
1273
+          #if MANUAL_PROBE_HEIGHT > 0
1274
+            current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
1278
             line_to_current(Z_AXIS);
1275
             line_to_current(Z_AXIS);
1279
             lcd_synchronize();
1276
             lcd_synchronize();
1277
+          #endif
1280
 
1278
 
1281
-            mbl.set_has_mesh(true);
1282
-            enqueue_and_echo_commands_P(PSTR("G28"));
1283
-            lcd_return_to_status();
1284
-            //LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
1285
-            #if HAS_BUZZER
1286
-              lcd_buzz(200, 659);
1287
-              lcd_buzz(200, 698);
1288
-            #endif
1289
-          }
1290
-          else {
1291
-            lcd_goto_screen(_lcd_level_goto_next_point);
1292
-          }
1279
+          mbl.set_has_mesh(true);
1280
+          mbl.set_reactivate(true);
1281
+          enqueue_and_echo_commands_P(PSTR("G28"));
1282
+          lcd_return_to_status();
1283
+          //LCD_MESSAGEPGM(MSG_LEVEL_BED_DONE);
1284
+          #if HAS_BUZZER
1285
+            lcd_buzz(200, 659);
1286
+            lcd_buzz(200, 698);
1287
+          #endif
1288
+        }
1289
+        else {
1290
+          lcd_goto_screen(_lcd_level_goto_next_point);
1293
         }
1291
         }
1294
-      }
1295
-      else {
1296
-        debounce_click = false;
1297
       }
1292
       }
1298
 
1293
 
1299
 KeepDrawing:
1294
 KeepDrawing:
1300
       // Update on first display, then only on updates to Z position
1295
       // Update on first display, then only on updates to Z position
1301
       // Show message above on clicks instead
1296
       // Show message above on clicks instead
1302
       if (lcdDrawUpdate) {
1297
       if (lcdDrawUpdate) {
1303
-        float v = current_position[Z_AXIS] - MESH_HOME_SEARCH_Z;
1298
+        const float v = current_position[Z_AXIS];
1304
         lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+'));
1299
         lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43sign(v + (v < 0 ? -0.0001 : 0.0001), '+'));
1305
       }
1300
       }
1306
 
1301
 
1312
     void _lcd_level_bed_moving() {
1307
     void _lcd_level_bed_moving() {
1313
       if (lcdDrawUpdate) {
1308
       if (lcdDrawUpdate) {
1314
         char msg[10];
1309
         char msg[10];
1315
-        sprintf_P(msg, PSTR("%i / %u"), (int)(_lcd_level_bed_position + 1), (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS));
1310
+        sprintf_P(msg, PSTR("%i / %u"), (int)(manual_probe_index + 1), (MESH_NUM_X_POINTS) * (MESH_NUM_Y_POINTS));
1316
         lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
1311
         lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_NEXT_POINT), msg);
1317
       }
1312
       }
1318
 
1313
 
1326
       // Set the menu to display ahead of blocking call
1321
       // Set the menu to display ahead of blocking call
1327
       lcd_goto_screen(_lcd_level_bed_moving);
1322
       lcd_goto_screen(_lcd_level_bed_moving);
1328
 
1323
 
1329
-      // _mbl_goto_xy runs the menu loop until the move is done
1324
+      // _manual_probe_xy runs the menu loop until the move is done
1330
       int8_t px, py;
1325
       int8_t px, py;
1331
-      mbl.zigzag(_lcd_level_bed_position, px, py);
1332
-      _mbl_goto_xy(mbl.get_probe_x(px), mbl.get_probe_y(py));
1326
+      mbl.zigzag(manual_probe_index, px, py);
1327
+      _manual_probe_xy(mbl.get_probe_x(px), mbl.get_probe_y(py));
1333
 
1328
 
1334
       // After the blocking function returns, change menus
1329
       // After the blocking function returns, change menus
1335
       lcd_goto_screen(_lcd_level_bed_get_z);
1330
       lcd_goto_screen(_lcd_level_bed_get_z);
1342
     void _lcd_level_bed_homing_done() {
1337
     void _lcd_level_bed_homing_done() {
1343
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1338
       if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_WAITING));
1344
       if (lcd_clicked) {
1339
       if (lcd_clicked) {
1345
-        _lcd_level_bed_position = 0;
1346
-        current_position[Z_AXIS] = MESH_HOME_SEARCH_Z
1347
-          #if Z_HOME_DIR > 0
1348
-            + Z_MAX_POS
1349
-          #endif
1350
-        ;
1351
-        planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1340
+        manual_probe_index = 0;
1352
         lcd_goto_screen(_lcd_level_goto_next_point);
1341
         lcd_goto_screen(_lcd_level_goto_next_point);
1353
       }
1342
       }
1354
     }
1343
     }
1607
     if (encoderPosition) {
1596
     if (encoderPosition) {
1608
       refresh_cmd_timeout();
1597
       refresh_cmd_timeout();
1609
 
1598
 
1610
-      // Limit to software endstops, if enabled
1611
-      float min = (soft_endstops_enabled && min_software_endstops) ? soft_endstop_min[axis] : current_position[axis] - 1000,
1612
-            max = (soft_endstops_enabled && max_software_endstops) ? soft_endstop_max[axis] : current_position[axis] + 1000;
1599
+      float min = current_position[axis] - 1000,
1600
+            max = current_position[axis] + 1000;
1601
+
1602
+      #if HAS_SOFTWARE_ENDSTOPS
1603
+        // Limit to software endstops, if enabled
1604
+        if (soft_endstops_enabled) {
1605
+          #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
1606
+            min = soft_endstop_min[axis];
1607
+          #endif
1608
+          #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
1609
+            max = soft_endstop_max[axis];
1610
+          #endif
1611
+        }
1612
+      #endif
1613
 
1613
 
1614
       // Get the new position
1614
       // Get the new position
1615
       current_position[axis] += float((int32_t)encoderPosition) * move_menu_scale;
1615
       current_position[axis] += float((int32_t)encoderPosition) * move_menu_scale;

Laden…
Annuleren
Opslaan