Browse Source

Merge pull request #7980 from thinkyhead/bf1_granular_sw_endstops

[1.1.x] Software endstop options by axis
Scott Lahteine 6 years ago
parent
commit
be55a49946
39 changed files with 859 additions and 99 deletions
  1. 22
    2
      Marlin/Configuration.h
  2. 20
    17
      Marlin/Marlin_main.cpp
  3. 19
    0
      Marlin/SanityCheck.h
  4. 22
    2
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  5. 22
    2
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  6. 22
    2
      Marlin/example_configurations/Anet/A6/Configuration.h
  7. 22
    2
      Marlin/example_configurations/Anet/A8/Configuration.h
  8. 22
    2
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  9. 22
    2
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  10. 22
    2
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  11. 22
    2
      Marlin/example_configurations/Cartesio/Configuration.h
  12. 22
    2
      Marlin/example_configurations/Creality/CR-10/Configuration.h
  13. 22
    2
      Marlin/example_configurations/Felix/Configuration.h
  14. 22
    2
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  15. 22
    2
      Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h
  16. 22
    2
      Marlin/example_configurations/Geeetech/GT2560/Configuration.h
  17. 22
    2
      Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h
  18. 22
    2
      Marlin/example_configurations/Infitary/i3-M508/Configuration.h
  19. 22
    2
      Marlin/example_configurations/Malyan/M150/Configuration.h
  20. 22
    2
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  21. 22
    2
      Marlin/example_configurations/RigidBot/Configuration.h
  22. 22
    2
      Marlin/example_configurations/SCARA/Configuration.h
  23. 22
    2
      Marlin/example_configurations/Sanguinololu/Configuration.h
  24. 22
    2
      Marlin/example_configurations/TinyBoy2/Configuration.h
  25. 22
    2
      Marlin/example_configurations/Velleman/K8200/Configuration.h
  26. 22
    2
      Marlin/example_configurations/Velleman/K8400/Configuration.h
  27. 22
    2
      Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h
  28. 22
    2
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  29. 22
    2
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  30. 22
    2
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  31. 22
    2
      Marlin/example_configurations/delta/generic/Configuration.h
  32. 22
    2
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  33. 22
    2
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  34. 22
    2
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  35. 22
    2
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h
  36. 22
    2
      Marlin/example_configurations/makibox/Configuration.h
  37. 22
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  38. 22
    2
      Marlin/example_configurations/wt150/Configuration.h
  39. 28
    10
      Marlin/ultralcd.cpp

+ 22
- 2
Marlin/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
786
 #define Z_MAX_POS 200
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 20
- 17
Marlin/Marlin_main.cpp View File

11719
    * Constrain the given coordinates to the software endstops.
11719
    * Constrain the given coordinates to the software endstops.
11720
    */
11720
    */
11721
 
11721
 
11722
-  // NOTE: This makes no sense for delta beds other than Z-axis.
11723
-  //       For delta the X/Y would need to be clamped at
11724
-  //       DELTA_PRINTABLE_RADIUS from center of bed, but delta
11725
-  //       now enforces is_position_reachable for X/Y regardless
11726
-  //       of HAS_SOFTWARE_ENDSTOPS, so that enforcement would be
11727
-  //       redundant here.
11728
-
11722
+  /**
11723
+   * Constrain the given coordinates to the software endstops.
11724
+   *
11725
+   * NOTE: This will only apply to Z on DELTA and SCARA. XY is
11726
+   *       constrained to a circle on these kinematic systems.
11727
+   */
11729
   void clamp_to_software_endstops(float target[XYZ]) {
11728
   void clamp_to_software_endstops(float target[XYZ]) {
11730
     if (!soft_endstops_enabled) return;
11729
     if (!soft_endstops_enabled) return;
11731
-    #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
11732
-      #if DISABLED(DELTA)
11733
-        NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
11734
-        NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
11735
-      #endif
11730
+    #if ENABLED(MIN_SOFTWARE_ENDSTOP_X)
11731
+      NOLESS(target[X_AXIS], soft_endstop_min[X_AXIS]);
11732
+    #endif
11733
+    #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y)
11734
+      NOLESS(target[Y_AXIS], soft_endstop_min[Y_AXIS]);
11735
+    #endif
11736
+    #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z)
11736
       NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
11737
       NOLESS(target[Z_AXIS], soft_endstop_min[Z_AXIS]);
11737
     #endif
11738
     #endif
11738
-    #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
11739
-      #if DISABLED(DELTA)
11740
-        NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
11741
-        NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
11742
-      #endif
11739
+    #if ENABLED(MAX_SOFTWARE_ENDSTOP_X)
11740
+      NOMORE(target[X_AXIS], soft_endstop_max[X_AXIS]);
11741
+    #endif
11742
+    #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y)
11743
+      NOMORE(target[Y_AXIS], soft_endstop_max[Y_AXIS]);
11744
+    #endif
11745
+    #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z)
11743
       NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);
11746
       NOMORE(target[Z_AXIS], soft_endstop_max[Z_AXIS]);
11744
     #endif
11747
     #endif
11745
   }
11748
   }

+ 19
- 0
Marlin/SanityCheck.h View File

255
   "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE.");
255
   "Movement bounds ([XY]_MIN_POS, [XY]_MAX_POS) are too narrow to contain [XY]_BED_SIZE.");
256
 
256
 
257
 /**
257
 /**
258
+ * Granular software endstops (Marlin >= 1.1.7)
259
+ */
260
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) && DISABLED(MIN_SOFTWARE_ENDSTOP_Z)
261
+  #if IS_KINEMATIC
262
+    #error "MIN_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MIN_SOFTWARE_ENDSTOP_Z."
263
+  #elif DISABLED(MIN_SOFTWARE_ENDSTOP_X) && DISABLED(MIN_SOFTWARE_ENDSTOP_Y)
264
+    #error "MIN_SOFTWARE_ENDSTOPS requires at least one of the MIN_SOFTWARE_ENDSTOP_[XYZ] options."
265
+  #endif
266
+#endif
267
+
268
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS) && DISABLED(MAX_SOFTWARE_ENDSTOP_Z)
269
+  #if IS_KINEMATIC
270
+    #error "MAX_SOFTWARE_ENDSTOPS on DELTA/SCARA also requires MAX_SOFTWARE_ENDSTOP_Z."
271
+  #elif DISABLED(MAX_SOFTWARE_ENDSTOP_X) && DISABLED(MAX_SOFTWARE_ENDSTOP_Y)
272
+    #error "MAX_SOFTWARE_ENDSTOPS requires at least one of the MAX_SOFTWARE_ENDSTOP_[XYZ] options."
273
+  #endif
274
+#endif
275
+
276
+/**
258
  * Progress Bar
277
  * Progress Bar
259
  */
278
  */
260
 #if ENABLED(LCD_PROGRESS_BAR)
279
 #if ENABLED(LCD_PROGRESS_BAR)

+ 22
- 2
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h View File

805
 #define Y_MAX_POS Y_BED_SIZE
805
 #define Y_MAX_POS Y_BED_SIZE
806
 #define Z_MAX_POS 250
806
 #define Z_MAX_POS 250
807
 
807
 
808
-// If enabled, axes won't move below MIN_POS in response to movement commands.
808
+/**
809
+ * Software Endstops
810
+ *
811
+ * - Prevent moves outside the set machine bounds.
812
+ * - Individual axes can be disabled, if desired.
813
+ * - X and Y only apply to Cartesian robots.
814
+ * - Use 'M211' to set software endstops on/off or report current state
815
+ */
816
+
817
+// Min software endstops curtail movement below minimum coordinate bounds
809
 #define MIN_SOFTWARE_ENDSTOPS
818
 #define MIN_SOFTWARE_ENDSTOPS
810
-// If enabled, axes won't move above MAX_POS in response to movement commands.
819
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
820
+  #define MIN_SOFTWARE_ENDSTOP_X
821
+  #define MIN_SOFTWARE_ENDSTOP_Y
822
+  #define MIN_SOFTWARE_ENDSTOP_Z
823
+#endif
824
+
825
+// Max software endstops curtail movement above maximum coordinate bounds
811
 #define MAX_SOFTWARE_ENDSTOPS
826
 #define MAX_SOFTWARE_ENDSTOPS
827
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
828
+  #define MAX_SOFTWARE_ENDSTOP_X
829
+  #define MAX_SOFTWARE_ENDSTOP_Y
830
+  #define MAX_SOFTWARE_ENDSTOP_Z
831
+#endif
812
 
832
 
813
 /**
833
 /**
814
  * Filament Runout Sensor
834
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/AliExpress/CL-260/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 260
786
 #define Z_MAX_POS 260
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Anet/A6/Configuration.h View File

904
 #define X_MAX_POS X_BED_SIZE
904
 #define X_MAX_POS X_BED_SIZE
905
 #define Y_MAX_POS Y_BED_SIZE
905
 #define Y_MAX_POS Y_BED_SIZE
906
 
906
 
907
-// If enabled, axes won't move below MIN_POS in response to movement commands.
907
+/**
908
+ * Software Endstops
909
+ *
910
+ * - Prevent moves outside the set machine bounds.
911
+ * - Individual axes can be disabled, if desired.
912
+ * - X and Y only apply to Cartesian robots.
913
+ * - Use 'M211' to set software endstops on/off or report current state
914
+ */
915
+
916
+// Min software endstops curtail movement below minimum coordinate bounds
908
 #define MIN_SOFTWARE_ENDSTOPS
917
 #define MIN_SOFTWARE_ENDSTOPS
909
-// If enabled, axes won't move above MAX_POS in response to movement commands.
918
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
919
+  #define MIN_SOFTWARE_ENDSTOP_X
920
+  #define MIN_SOFTWARE_ENDSTOP_Y
921
+  #define MIN_SOFTWARE_ENDSTOP_Z
922
+#endif
923
+
924
+// Max software endstops curtail movement above maximum coordinate bounds
910
 #define MAX_SOFTWARE_ENDSTOPS
925
 #define MAX_SOFTWARE_ENDSTOPS
926
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
927
+  #define MAX_SOFTWARE_ENDSTOP_X
928
+  #define MAX_SOFTWARE_ENDSTOP_Y
929
+  #define MAX_SOFTWARE_ENDSTOP_Z
930
+#endif
911
 
931
 
912
 /**
932
 /**
913
  * Filament Runout Sensor
933
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Anet/A8/Configuration.h View File

791
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Y_MAX_POS Y_BED_SIZE
792
 #define Z_MAX_POS 240
792
 #define Z_MAX_POS 240
793
 
793
 
794
-// If enabled, axes won't move below MIN_POS in response to movement commands.
794
+/**
795
+ * Software Endstops
796
+ *
797
+ * - Prevent moves outside the set machine bounds.
798
+ * - Individual axes can be disabled, if desired.
799
+ * - X and Y only apply to Cartesian robots.
800
+ * - Use 'M211' to set software endstops on/off or report current state
801
+ */
802
+
803
+// Min software endstops curtail movement below minimum coordinate bounds
795
 #define MIN_SOFTWARE_ENDSTOPS
804
 #define MIN_SOFTWARE_ENDSTOPS
796
-// If enabled, axes won't move above MAX_POS in response to movement commands.
805
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
806
+  #define MIN_SOFTWARE_ENDSTOP_X
807
+  #define MIN_SOFTWARE_ENDSTOP_Y
808
+  #define MIN_SOFTWARE_ENDSTOP_Z
809
+#endif
810
+
811
+// Max software endstops curtail movement above maximum coordinate bounds
797
 #define MAX_SOFTWARE_ENDSTOPS
812
 #define MAX_SOFTWARE_ENDSTOPS
813
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
814
+  #define MAX_SOFTWARE_ENDSTOP_X
815
+  #define MAX_SOFTWARE_ENDSTOP_Y
816
+  #define MAX_SOFTWARE_ENDSTOP_Z
817
+#endif
798
 
818
 
799
 /**
819
 /**
800
  * Filament Runout Sensor
820
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/BQ/Hephestos/Configuration.h View File

776
 #define Y_MAX_POS Y_BED_SIZE
776
 #define Y_MAX_POS Y_BED_SIZE
777
 #define Z_MAX_POS 180
777
 #define Z_MAX_POS 180
778
 
778
 
779
-// If enabled, axes won't move below MIN_POS in response to movement commands.
779
+/**
780
+ * Software Endstops
781
+ *
782
+ * - Prevent moves outside the set machine bounds.
783
+ * - Individual axes can be disabled, if desired.
784
+ * - X and Y only apply to Cartesian robots.
785
+ * - Use 'M211' to set software endstops on/off or report current state
786
+ */
787
+
788
+// Min software endstops curtail movement below minimum coordinate bounds
780
 #define MIN_SOFTWARE_ENDSTOPS
789
 #define MIN_SOFTWARE_ENDSTOPS
781
-// If enabled, axes won't move above MAX_POS in response to movement commands.
790
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
791
+  #define MIN_SOFTWARE_ENDSTOP_X
792
+  #define MIN_SOFTWARE_ENDSTOP_Y
793
+  #define MIN_SOFTWARE_ENDSTOP_Z
794
+#endif
795
+
796
+// Max software endstops curtail movement above maximum coordinate bounds
782
 #define MAX_SOFTWARE_ENDSTOPS
797
 #define MAX_SOFTWARE_ENDSTOPS
798
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
799
+  #define MAX_SOFTWARE_ENDSTOP_X
800
+  #define MAX_SOFTWARE_ENDSTOP_Y
801
+  #define MAX_SOFTWARE_ENDSTOP_Z
802
+#endif
783
 
803
 
784
 /**
804
 /**
785
  * Filament Runout Sensor
805
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h View File

786
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Y_MAX_POS Y_BED_SIZE
787
 #define Z_MAX_POS 210
787
 #define Z_MAX_POS 210
788
 
788
 
789
-// If enabled, axes won't move below MIN_POS in response to movement commands.
789
+/**
790
+ * Software Endstops
791
+ *
792
+ * - Prevent moves outside the set machine bounds.
793
+ * - Individual axes can be disabled, if desired.
794
+ * - X and Y only apply to Cartesian robots.
795
+ * - Use 'M211' to set software endstops on/off or report current state
796
+ */
797
+
798
+// Min software endstops curtail movement below minimum coordinate bounds
790
 #define MIN_SOFTWARE_ENDSTOPS
799
 #define MIN_SOFTWARE_ENDSTOPS
791
-// If enabled, axes won't move above MAX_POS in response to movement commands.
800
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
801
+  #define MIN_SOFTWARE_ENDSTOP_X
802
+  #define MIN_SOFTWARE_ENDSTOP_Y
803
+  #define MIN_SOFTWARE_ENDSTOP_Z
804
+#endif
805
+
806
+// Max software endstops curtail movement above maximum coordinate bounds
792
 #define MAX_SOFTWARE_ENDSTOPS
807
 #define MAX_SOFTWARE_ENDSTOPS
808
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
809
+  #define MAX_SOFTWARE_ENDSTOP_X
810
+  #define MAX_SOFTWARE_ENDSTOP_Y
811
+  #define MAX_SOFTWARE_ENDSTOP_Z
812
+#endif
793
 
813
 
794
 /**
814
 /**
795
  * Filament Runout Sensor
815
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/BQ/WITBOX/Configuration.h View File

776
 #define Y_MAX_POS Y_BED_SIZE
776
 #define Y_MAX_POS Y_BED_SIZE
777
 #define Z_MAX_POS 200
777
 #define Z_MAX_POS 200
778
 
778
 
779
-// If enabled, axes won't move below MIN_POS in response to movement commands.
779
+/**
780
+ * Software Endstops
781
+ *
782
+ * - Prevent moves outside the set machine bounds.
783
+ * - Individual axes can be disabled, if desired.
784
+ * - X and Y only apply to Cartesian robots.
785
+ * - Use 'M211' to set software endstops on/off or report current state
786
+ */
787
+
788
+// Min software endstops curtail movement below minimum coordinate bounds
780
 #define MIN_SOFTWARE_ENDSTOPS
789
 #define MIN_SOFTWARE_ENDSTOPS
781
-// If enabled, axes won't move above MAX_POS in response to movement commands.
790
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
791
+  #define MIN_SOFTWARE_ENDSTOP_X
792
+  #define MIN_SOFTWARE_ENDSTOP_Y
793
+  #define MIN_SOFTWARE_ENDSTOP_Z
794
+#endif
795
+
796
+// Max software endstops curtail movement above maximum coordinate bounds
782
 #define MAX_SOFTWARE_ENDSTOPS
797
 #define MAX_SOFTWARE_ENDSTOPS
798
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
799
+  #define MAX_SOFTWARE_ENDSTOP_X
800
+  #define MAX_SOFTWARE_ENDSTOP_Y
801
+  #define MAX_SOFTWARE_ENDSTOP_Z
802
+#endif
783
 
803
 
784
 /**
804
 /**
785
  * Filament Runout Sensor
805
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Cartesio/Configuration.h View File

784
 #define Y_MAX_POS Y_BED_SIZE
784
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Z_MAX_POS 400
785
 #define Z_MAX_POS 400
786
 
786
 
787
-// If enabled, axes won't move below MIN_POS in response to movement commands.
787
+/**
788
+ * Software Endstops
789
+ *
790
+ * - Prevent moves outside the set machine bounds.
791
+ * - Individual axes can be disabled, if desired.
792
+ * - X and Y only apply to Cartesian robots.
793
+ * - Use 'M211' to set software endstops on/off or report current state
794
+ */
795
+
796
+// Min software endstops curtail movement below minimum coordinate bounds
788
 #define MIN_SOFTWARE_ENDSTOPS
797
 #define MIN_SOFTWARE_ENDSTOPS
789
-// If enabled, axes won't move above MAX_POS in response to movement commands.
798
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
799
+  #define MIN_SOFTWARE_ENDSTOP_X
800
+  #define MIN_SOFTWARE_ENDSTOP_Y
801
+  #define MIN_SOFTWARE_ENDSTOP_Z
802
+#endif
803
+
804
+// Max software endstops curtail movement above maximum coordinate bounds
790
 #define MAX_SOFTWARE_ENDSTOPS
805
 #define MAX_SOFTWARE_ENDSTOPS
806
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
807
+  #define MAX_SOFTWARE_ENDSTOP_X
808
+  #define MAX_SOFTWARE_ENDSTOP_Y
809
+  #define MAX_SOFTWARE_ENDSTOP_Z
810
+#endif
791
 
811
 
792
 /**
812
 /**
793
  * Filament Runout Sensor
813
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Creality/CR-10/Configuration.h View File

795
 #define Y_MAX_POS Y_BED_SIZE
795
 #define Y_MAX_POS Y_BED_SIZE
796
 #define Z_MAX_POS 400
796
 #define Z_MAX_POS 400
797
 
797
 
798
-// If enabled, axes won't move below MIN_POS in response to movement commands.
798
+/**
799
+ * Software Endstops
800
+ *
801
+ * - Prevent moves outside the set machine bounds.
802
+ * - Individual axes can be disabled, if desired.
803
+ * - X and Y only apply to Cartesian robots.
804
+ * - Use 'M211' to set software endstops on/off or report current state
805
+ */
806
+
807
+// Min software endstops curtail movement below minimum coordinate bounds
799
 #define MIN_SOFTWARE_ENDSTOPS
808
 #define MIN_SOFTWARE_ENDSTOPS
800
-// If enabled, axes won't move above MAX_POS in response to movement commands.
809
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
810
+  #define MIN_SOFTWARE_ENDSTOP_X
811
+  #define MIN_SOFTWARE_ENDSTOP_Y
812
+  #define MIN_SOFTWARE_ENDSTOP_Z
813
+#endif
814
+
815
+// Max software endstops curtail movement above maximum coordinate bounds
801
 #define MAX_SOFTWARE_ENDSTOPS
816
 #define MAX_SOFTWARE_ENDSTOPS
817
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
818
+  #define MAX_SOFTWARE_ENDSTOP_X
819
+  #define MAX_SOFTWARE_ENDSTOP_Y
820
+  #define MAX_SOFTWARE_ENDSTOP_Z
821
+#endif
802
 
822
 
803
 /**
823
 /**
804
  * Filament Runout Sensor
824
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Felix/Configuration.h View File

767
 #define Y_MAX_POS Y_BED_SIZE
767
 #define Y_MAX_POS Y_BED_SIZE
768
 #define Z_MAX_POS 235
768
 #define Z_MAX_POS 235
769
 
769
 
770
-// If enabled, axes won't move below MIN_POS in response to movement commands.
770
+/**
771
+ * Software Endstops
772
+ *
773
+ * - Prevent moves outside the set machine bounds.
774
+ * - Individual axes can be disabled, if desired.
775
+ * - X and Y only apply to Cartesian robots.
776
+ * - Use 'M211' to set software endstops on/off or report current state
777
+ */
778
+
779
+// Min software endstops curtail movement below minimum coordinate bounds
771
 #define MIN_SOFTWARE_ENDSTOPS
780
 #define MIN_SOFTWARE_ENDSTOPS
772
-// If enabled, axes won't move above MAX_POS in response to movement commands.
781
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
782
+  #define MIN_SOFTWARE_ENDSTOP_X
783
+  #define MIN_SOFTWARE_ENDSTOP_Y
784
+  #define MIN_SOFTWARE_ENDSTOP_Z
785
+#endif
786
+
787
+// Max software endstops curtail movement above maximum coordinate bounds
773
 #define MAX_SOFTWARE_ENDSTOPS
788
 #define MAX_SOFTWARE_ENDSTOPS
789
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
790
+  #define MAX_SOFTWARE_ENDSTOP_X
791
+  #define MAX_SOFTWARE_ENDSTOP_Y
792
+  #define MAX_SOFTWARE_ENDSTOP_Z
793
+#endif
774
 
794
 
775
 /**
795
 /**
776
  * Filament Runout Sensor
796
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

767
 #define Y_MAX_POS Y_BED_SIZE
767
 #define Y_MAX_POS Y_BED_SIZE
768
 #define Z_MAX_POS 235
768
 #define Z_MAX_POS 235
769
 
769
 
770
-// If enabled, axes won't move below MIN_POS in response to movement commands.
770
+/**
771
+ * Software Endstops
772
+ *
773
+ * - Prevent moves outside the set machine bounds.
774
+ * - Individual axes can be disabled, if desired.
775
+ * - X and Y only apply to Cartesian robots.
776
+ * - Use 'M211' to set software endstops on/off or report current state
777
+ */
778
+
779
+// Min software endstops curtail movement below minimum coordinate bounds
771
 #define MIN_SOFTWARE_ENDSTOPS
780
 #define MIN_SOFTWARE_ENDSTOPS
772
-// If enabled, axes won't move above MAX_POS in response to movement commands.
781
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
782
+  #define MIN_SOFTWARE_ENDSTOP_X
783
+  #define MIN_SOFTWARE_ENDSTOP_Y
784
+  #define MIN_SOFTWARE_ENDSTOP_Z
785
+#endif
786
+
787
+// Max software endstops curtail movement above maximum coordinate bounds
773
 #define MAX_SOFTWARE_ENDSTOPS
788
 #define MAX_SOFTWARE_ENDSTOPS
789
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
790
+  #define MAX_SOFTWARE_ENDSTOP_X
791
+  #define MAX_SOFTWARE_ENDSTOP_Y
792
+  #define MAX_SOFTWARE_ENDSTOP_Z
793
+#endif
774
 
794
 
775
 /**
795
 /**
776
  * Filament Runout Sensor
796
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h View File

788
 #define Y_MAX_POS Y_BED_SIZE
788
 #define Y_MAX_POS Y_BED_SIZE
789
 #define Z_MAX_POS 175
789
 #define Z_MAX_POS 175
790
 
790
 
791
-// If enabled, axes won't move below MIN_POS in response to movement commands.
791
+/**
792
+ * Software Endstops
793
+ *
794
+ * - Prevent moves outside the set machine bounds.
795
+ * - Individual axes can be disabled, if desired.
796
+ * - X and Y only apply to Cartesian robots.
797
+ * - Use 'M211' to set software endstops on/off or report current state
798
+ */
799
+
800
+// Min software endstops curtail movement below minimum coordinate bounds
792
 //#define MIN_SOFTWARE_ENDSTOPS
801
 //#define MIN_SOFTWARE_ENDSTOPS
793
-// If enabled, axes won't move above MAX_POS in response to movement commands.
802
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
803
+  #define MIN_SOFTWARE_ENDSTOP_X
804
+  #define MIN_SOFTWARE_ENDSTOP_Y
805
+  #define MIN_SOFTWARE_ENDSTOP_Z
806
+#endif
807
+
808
+// Max software endstops curtail movement above maximum coordinate bounds
794
 #define MAX_SOFTWARE_ENDSTOPS
809
 #define MAX_SOFTWARE_ENDSTOPS
810
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
811
+  #define MAX_SOFTWARE_ENDSTOP_X
812
+  #define MAX_SOFTWARE_ENDSTOP_Y
813
+  #define MAX_SOFTWARE_ENDSTOP_Z
814
+#endif
795
 
815
 
796
 /**
816
 /**
797
  * Filament Runout Sensor
817
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Geeetech/GT2560/Configuration.h View File

800
 #define Y_MAX_POS Y_BED_SIZE
800
 #define Y_MAX_POS Y_BED_SIZE
801
 #define Z_MAX_POS 200
801
 #define Z_MAX_POS 200
802
 
802
 
803
-// If enabled, axes won't move below MIN_POS in response to movement commands.
803
+/**
804
+ * Software Endstops
805
+ *
806
+ * - Prevent moves outside the set machine bounds.
807
+ * - Individual axes can be disabled, if desired.
808
+ * - X and Y only apply to Cartesian robots.
809
+ * - Use 'M211' to set software endstops on/off or report current state
810
+ */
811
+
812
+// Min software endstops curtail movement below minimum coordinate bounds
804
 #define MIN_SOFTWARE_ENDSTOPS
813
 #define MIN_SOFTWARE_ENDSTOPS
805
-// If enabled, axes won't move above MAX_POS in response to movement commands.
814
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
815
+  #define MIN_SOFTWARE_ENDSTOP_X
816
+  #define MIN_SOFTWARE_ENDSTOP_Y
817
+  #define MIN_SOFTWARE_ENDSTOP_Z
818
+#endif
819
+
820
+// Max software endstops curtail movement above maximum coordinate bounds
806
 #define MAX_SOFTWARE_ENDSTOPS
821
 #define MAX_SOFTWARE_ENDSTOPS
822
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
823
+  #define MAX_SOFTWARE_ENDSTOP_X
824
+  #define MAX_SOFTWARE_ENDSTOP_Y
825
+  #define MAX_SOFTWARE_ENDSTOP_Z
826
+#endif
807
 
827
 
808
 /**
828
 /**
809
  * Filament Runout Sensor
829
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 170
786
 #define Z_MAX_POS 170
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Infitary/i3-M508/Configuration.h View File

789
 #define Y_MAX_POS Y_BED_SIZE
789
 #define Y_MAX_POS Y_BED_SIZE
790
 #define Z_MAX_POS 185
790
 #define Z_MAX_POS 185
791
 
791
 
792
-// If enabled, axes won't move below MIN_POS in response to movement commands.
792
+/**
793
+ * Software Endstops
794
+ *
795
+ * - Prevent moves outside the set machine bounds.
796
+ * - Individual axes can be disabled, if desired.
797
+ * - X and Y only apply to Cartesian robots.
798
+ * - Use 'M211' to set software endstops on/off or report current state
799
+ */
800
+
801
+// Min software endstops curtail movement below minimum coordinate bounds
793
 #define MIN_SOFTWARE_ENDSTOPS
802
 #define MIN_SOFTWARE_ENDSTOPS
794
-// If enabled, axes won't move above MAX_POS in response to movement commands.
803
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
804
+  #define MIN_SOFTWARE_ENDSTOP_X
805
+  #define MIN_SOFTWARE_ENDSTOP_Y
806
+  #define MIN_SOFTWARE_ENDSTOP_Z
807
+#endif
808
+
809
+// Max software endstops curtail movement above maximum coordinate bounds
795
 #define MAX_SOFTWARE_ENDSTOPS
810
 #define MAX_SOFTWARE_ENDSTOPS
811
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
812
+  #define MAX_SOFTWARE_ENDSTOP_X
813
+  #define MAX_SOFTWARE_ENDSTOP_Y
814
+  #define MAX_SOFTWARE_ENDSTOP_Z
815
+#endif
796
 
816
 
797
 /**
817
 /**
798
  * Filament Runout Sensor
818
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Malyan/M150/Configuration.h View File

809
 #define Y_MAX_POS Y_BED_SIZE
809
 #define Y_MAX_POS Y_BED_SIZE
810
 #define Z_MAX_POS 180
810
 #define Z_MAX_POS 180
811
 
811
 
812
-// If enabled, axes won't move below MIN_POS in response to movement commands.
812
+/**
813
+ * Software Endstops
814
+ *
815
+ * - Prevent moves outside the set machine bounds.
816
+ * - Individual axes can be disabled, if desired.
817
+ * - X and Y only apply to Cartesian robots.
818
+ * - Use 'M211' to set software endstops on/off or report current state
819
+ */
820
+
821
+// Min software endstops curtail movement below minimum coordinate bounds
813
 #define MIN_SOFTWARE_ENDSTOPS
822
 #define MIN_SOFTWARE_ENDSTOPS
814
-// If enabled, axes won't move above MAX_POS in response to movement commands.
823
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
824
+  #define MIN_SOFTWARE_ENDSTOP_X
825
+  #define MIN_SOFTWARE_ENDSTOP_Y
826
+  #define MIN_SOFTWARE_ENDSTOP_Z
827
+#endif
828
+
829
+// Max software endstops curtail movement above maximum coordinate bounds
815
 #define MAX_SOFTWARE_ENDSTOPS
830
 #define MAX_SOFTWARE_ENDSTOPS
831
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
832
+  #define MAX_SOFTWARE_ENDSTOP_X
833
+  #define MAX_SOFTWARE_ENDSTOP_Y
834
+  #define MAX_SOFTWARE_ENDSTOP_Z
835
+#endif
816
 
836
 
817
 /**
837
 /**
818
  * Filament Runout Sensor
838
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
786
 #define Z_MAX_POS 200
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/RigidBot/Configuration.h View File

783
 #define Y_MAX_POS Y_BED_SIZE
783
 #define Y_MAX_POS Y_BED_SIZE
784
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
784
 #define Z_MAX_POS 254  // RigidBot regular and Big are 254mm
785
 
785
 
786
-// If enabled, axes won't move below MIN_POS in response to movement commands.
786
+/**
787
+ * Software Endstops
788
+ *
789
+ * - Prevent moves outside the set machine bounds.
790
+ * - Individual axes can be disabled, if desired.
791
+ * - X and Y only apply to Cartesian robots.
792
+ * - Use 'M211' to set software endstops on/off or report current state
793
+ */
794
+
795
+// Min software endstops curtail movement below minimum coordinate bounds
787
 #define MIN_SOFTWARE_ENDSTOPS
796
 #define MIN_SOFTWARE_ENDSTOPS
788
-// If enabled, axes won't move above MAX_POS in response to movement commands.
797
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
798
+  #define MIN_SOFTWARE_ENDSTOP_X
799
+  #define MIN_SOFTWARE_ENDSTOP_Y
800
+  #define MIN_SOFTWARE_ENDSTOP_Z
801
+#endif
802
+
803
+// Max software endstops curtail movement above maximum coordinate bounds
789
 #define MAX_SOFTWARE_ENDSTOPS
804
 #define MAX_SOFTWARE_ENDSTOPS
805
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
806
+  #define MAX_SOFTWARE_ENDSTOP_X
807
+  #define MAX_SOFTWARE_ENDSTOP_Y
808
+  #define MAX_SOFTWARE_ENDSTOP_Z
809
+#endif
790
 
810
 
791
 /**
811
 /**
792
  * Filament Runout Sensor
812
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

797
 #define Y_MAX_POS Y_BED_SIZE
797
 #define Y_MAX_POS Y_BED_SIZE
798
 #define Z_MAX_POS 225
798
 #define Z_MAX_POS 225
799
 
799
 
800
-// If enabled, axes won't move below MIN_POS in response to movement commands.
800
+/**
801
+ * Software Endstops
802
+ *
803
+ * - Prevent moves outside the set machine bounds.
804
+ * - Individual axes can be disabled, if desired.
805
+ * - X and Y only apply to Cartesian robots.
806
+ * - Use 'M211' to set software endstops on/off or report current state
807
+ */
808
+
809
+// Min software endstops curtail movement below minimum coordinate bounds
801
 #define MIN_SOFTWARE_ENDSTOPS
810
 #define MIN_SOFTWARE_ENDSTOPS
802
-// If enabled, axes won't move above MAX_POS in response to movement commands.
811
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
812
+  #define MIN_SOFTWARE_ENDSTOP_X
813
+  #define MIN_SOFTWARE_ENDSTOP_Y
814
+  #define MIN_SOFTWARE_ENDSTOP_Z
815
+#endif
816
+
817
+// Max software endstops curtail movement above maximum coordinate bounds
803
 #define MAX_SOFTWARE_ENDSTOPS
818
 #define MAX_SOFTWARE_ENDSTOPS
819
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
820
+  #define MAX_SOFTWARE_ENDSTOP_X
821
+  #define MAX_SOFTWARE_ENDSTOP_Y
822
+  #define MAX_SOFTWARE_ENDSTOP_Z
823
+#endif
804
 
824
 
805
 /**
825
 /**
806
  * Filament Runout Sensor
826
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Sanguinololu/Configuration.h View File

816
 #define Y_MAX_POS Y_BED_SIZE
816
 #define Y_MAX_POS Y_BED_SIZE
817
 #define Z_MAX_POS 170
817
 #define Z_MAX_POS 170
818
 
818
 
819
-// If enabled, axes won't move below MIN_POS in response to movement commands.
819
+/**
820
+ * Software Endstops
821
+ *
822
+ * - Prevent moves outside the set machine bounds.
823
+ * - Individual axes can be disabled, if desired.
824
+ * - X and Y only apply to Cartesian robots.
825
+ * - Use 'M211' to set software endstops on/off or report current state
826
+ */
827
+
828
+// Min software endstops curtail movement below minimum coordinate bounds
820
 #define MIN_SOFTWARE_ENDSTOPS
829
 #define MIN_SOFTWARE_ENDSTOPS
821
-// If enabled, axes won't move above MAX_POS in response to movement commands.
830
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
831
+  #define MIN_SOFTWARE_ENDSTOP_X
832
+  #define MIN_SOFTWARE_ENDSTOP_Y
833
+  #define MIN_SOFTWARE_ENDSTOP_Z
834
+#endif
835
+
836
+// Max software endstops curtail movement above maximum coordinate bounds
822
 #define MAX_SOFTWARE_ENDSTOPS
837
 #define MAX_SOFTWARE_ENDSTOPS
838
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
839
+  #define MAX_SOFTWARE_ENDSTOP_X
840
+  #define MAX_SOFTWARE_ENDSTOP_Y
841
+  #define MAX_SOFTWARE_ENDSTOP_Z
842
+#endif
823
 
843
 
824
 /**
844
 /**
825
  * Filament Runout Sensor
845
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/TinyBoy2/Configuration.h View File

841
   #define Z_MAX_POS 158
841
   #define Z_MAX_POS 158
842
 #endif
842
 #endif
843
 
843
 
844
-// If enabled, axes won't move below MIN_POS in response to movement commands.
844
+/**
845
+ * Software Endstops
846
+ *
847
+ * - Prevent moves outside the set machine bounds.
848
+ * - Individual axes can be disabled, if desired.
849
+ * - X and Y only apply to Cartesian robots.
850
+ * - Use 'M211' to set software endstops on/off or report current state
851
+ */
852
+
853
+// Min software endstops curtail movement below minimum coordinate bounds
845
 #define MIN_SOFTWARE_ENDSTOPS
854
 #define MIN_SOFTWARE_ENDSTOPS
846
-// If enabled, axes won't move above MAX_POS in response to movement commands.
855
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
856
+  #define MIN_SOFTWARE_ENDSTOP_X
857
+  #define MIN_SOFTWARE_ENDSTOP_Y
858
+  #define MIN_SOFTWARE_ENDSTOP_Z
859
+#endif
860
+
861
+// Max software endstops curtail movement above maximum coordinate bounds
847
 #define MAX_SOFTWARE_ENDSTOPS
862
 #define MAX_SOFTWARE_ENDSTOPS
863
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
864
+  #define MAX_SOFTWARE_ENDSTOP_X
865
+  #define MAX_SOFTWARE_ENDSTOP_Y
866
+  #define MAX_SOFTWARE_ENDSTOP_Z
867
+#endif
848
 
868
 
849
 /**
869
 /**
850
  * Filament Runout Sensor
870
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Velleman/K8200/Configuration.h View File

815
 #define Y_MAX_POS Y_BED_SIZE
815
 #define Y_MAX_POS Y_BED_SIZE
816
 #define Z_MAX_POS 200
816
 #define Z_MAX_POS 200
817
 
817
 
818
-// If enabled, axes won't move below MIN_POS in response to movement commands.
818
+/**
819
+ * Software Endstops
820
+ *
821
+ * - Prevent moves outside the set machine bounds.
822
+ * - Individual axes can be disabled, if desired.
823
+ * - X and Y only apply to Cartesian robots.
824
+ * - Use 'M211' to set software endstops on/off or report current state
825
+ */
826
+
827
+// Min software endstops curtail movement below minimum coordinate bounds
819
 #define MIN_SOFTWARE_ENDSTOPS
828
 #define MIN_SOFTWARE_ENDSTOPS
820
-// If enabled, axes won't move above MAX_POS in response to movement commands.
829
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
830
+  #define MIN_SOFTWARE_ENDSTOP_X
831
+  #define MIN_SOFTWARE_ENDSTOP_Y
832
+  #define MIN_SOFTWARE_ENDSTOP_Z
833
+#endif
834
+
835
+// Max software endstops curtail movement above maximum coordinate bounds
821
 #define MAX_SOFTWARE_ENDSTOPS
836
 #define MAX_SOFTWARE_ENDSTOPS
837
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
838
+  #define MAX_SOFTWARE_ENDSTOP_X
839
+  #define MAX_SOFTWARE_ENDSTOP_Y
840
+  #define MAX_SOFTWARE_ENDSTOP_Z
841
+#endif
822
 
842
 
823
 /**
843
 /**
824
  * Filament Runout Sensor
844
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Velleman/K8400/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 190
786
 #define Z_MAX_POS 190
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 190
786
 #define Z_MAX_POS 190
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

785
 #define Y_MAX_POS Y_BED_SIZE
785
 #define Y_MAX_POS Y_BED_SIZE
786
 #define Z_MAX_POS 200
786
 #define Z_MAX_POS 200
787
 
787
 
788
-// If enabled, axes won't move below MIN_POS in response to movement commands.
788
+/**
789
+ * Software Endstops
790
+ *
791
+ * - Prevent moves outside the set machine bounds.
792
+ * - Individual axes can be disabled, if desired.
793
+ * - X and Y only apply to Cartesian robots.
794
+ * - Use 'M211' to set software endstops on/off or report current state
795
+ */
796
+
797
+// Min software endstops curtail movement below minimum coordinate bounds
789
 #define MIN_SOFTWARE_ENDSTOPS
798
 #define MIN_SOFTWARE_ENDSTOPS
790
-// If enabled, axes won't move above MAX_POS in response to movement commands.
799
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
800
+  #define MIN_SOFTWARE_ENDSTOP_X
801
+  #define MIN_SOFTWARE_ENDSTOP_Y
802
+  #define MIN_SOFTWARE_ENDSTOP_Z
803
+#endif
804
+
805
+// Max software endstops curtail movement above maximum coordinate bounds
791
 #define MAX_SOFTWARE_ENDSTOPS
806
 #define MAX_SOFTWARE_ENDSTOPS
807
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
808
+  #define MAX_SOFTWARE_ENDSTOP_X
809
+  #define MAX_SOFTWARE_ENDSTOP_Y
810
+  #define MAX_SOFTWARE_ENDSTOP_Z
811
+#endif
792
 
812
 
793
 /**
813
 /**
794
  * Filament Runout Sensor
814
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h View File

909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
911
 
911
 
912
-// If enabled, axes won't move below MIN_POS in response to movement commands.
912
+/**
913
+ * Software Endstops
914
+ *
915
+ * - Prevent moves outside the set machine bounds.
916
+ * - Individual axes can be disabled, if desired.
917
+ * - X and Y only apply to Cartesian robots.
918
+ * - Use 'M211' to set software endstops on/off or report current state
919
+ */
920
+
921
+// Min software endstops curtail movement below minimum coordinate bounds
913
 //#define MIN_SOFTWARE_ENDSTOPS
922
 //#define MIN_SOFTWARE_ENDSTOPS
914
-// If enabled, axes won't move above MAX_POS in response to movement commands.
923
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
924
+  #define MIN_SOFTWARE_ENDSTOP_X
925
+  #define MIN_SOFTWARE_ENDSTOP_Y
926
+  #define MIN_SOFTWARE_ENDSTOP_Z
927
+#endif
928
+
929
+// Max software endstops curtail movement above maximum coordinate bounds
915
 #define MAX_SOFTWARE_ENDSTOPS
930
 #define MAX_SOFTWARE_ENDSTOPS
931
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
932
+  #define MAX_SOFTWARE_ENDSTOP_X
933
+  #define MAX_SOFTWARE_ENDSTOP_Y
934
+  #define MAX_SOFTWARE_ENDSTOP_Z
935
+#endif
916
 
936
 
917
 /**
937
 /**
918
  * Filament Runout Sensor
938
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h View File

909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
909
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
910
 #define Z_MAX_POS MANUAL_Z_HOME_POS
911
 
911
 
912
-// If enabled, axes won't move below MIN_POS in response to movement commands.
912
+/**
913
+ * Software Endstops
914
+ *
915
+ * - Prevent moves outside the set machine bounds.
916
+ * - Individual axes can be disabled, if desired.
917
+ * - X and Y only apply to Cartesian robots.
918
+ * - Use 'M211' to set software endstops on/off or report current state
919
+ */
920
+
921
+// Min software endstops curtail movement below minimum coordinate bounds
913
 #define MIN_SOFTWARE_ENDSTOPS
922
 #define MIN_SOFTWARE_ENDSTOPS
914
-// If enabled, axes won't move above MAX_POS in response to movement commands.
923
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
924
+  #define MIN_SOFTWARE_ENDSTOP_X
925
+  #define MIN_SOFTWARE_ENDSTOP_Y
926
+  #define MIN_SOFTWARE_ENDSTOP_Z
927
+#endif
928
+
929
+// Max software endstops curtail movement above maximum coordinate bounds
915
 #define MAX_SOFTWARE_ENDSTOPS
930
 #define MAX_SOFTWARE_ENDSTOPS
931
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
932
+  #define MAX_SOFTWARE_ENDSTOP_X
933
+  #define MAX_SOFTWARE_ENDSTOP_Y
934
+  #define MAX_SOFTWARE_ENDSTOP_Z
935
+#endif
916
 
936
 
917
 /**
937
 /**
918
  * Filament Runout Sensor
938
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/generic/Configuration.h View File

896
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
896
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
897
 #define Z_MAX_POS MANUAL_Z_HOME_POS
897
 #define Z_MAX_POS MANUAL_Z_HOME_POS
898
 
898
 
899
-// If enabled, axes won't move below MIN_POS in response to movement commands.
899
+/**
900
+ * Software Endstops
901
+ *
902
+ * - Prevent moves outside the set machine bounds.
903
+ * - Individual axes can be disabled, if desired.
904
+ * - X and Y only apply to Cartesian robots.
905
+ * - Use 'M211' to set software endstops on/off or report current state
906
+ */
907
+
908
+// Min software endstops curtail movement below minimum coordinate bounds
900
 #define MIN_SOFTWARE_ENDSTOPS
909
 #define MIN_SOFTWARE_ENDSTOPS
901
-// If enabled, axes won't move above MAX_POS in response to movement commands.
910
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
911
+  #define MIN_SOFTWARE_ENDSTOP_X
912
+  #define MIN_SOFTWARE_ENDSTOP_Y
913
+  #define MIN_SOFTWARE_ENDSTOP_Z
914
+#endif
915
+
916
+// Max software endstops curtail movement above maximum coordinate bounds
902
 #define MAX_SOFTWARE_ENDSTOPS
917
 #define MAX_SOFTWARE_ENDSTOPS
918
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
919
+  #define MAX_SOFTWARE_ENDSTOP_X
920
+  #define MAX_SOFTWARE_ENDSTOP_Y
921
+  #define MAX_SOFTWARE_ENDSTOP_Z
922
+#endif
903
 
923
 
904
 /**
924
 /**
905
  * Filament Runout Sensor
925
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

899
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
899
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
900
 #define Z_MAX_POS MANUAL_Z_HOME_POS
900
 #define Z_MAX_POS MANUAL_Z_HOME_POS
901
 
901
 
902
-// If enabled, axes won't move below MIN_POS in response to movement commands.
902
+/**
903
+ * Software Endstops
904
+ *
905
+ * - Prevent moves outside the set machine bounds.
906
+ * - Individual axes can be disabled, if desired.
907
+ * - X and Y only apply to Cartesian robots.
908
+ * - Use 'M211' to set software endstops on/off or report current state
909
+ */
910
+
911
+// Min software endstops curtail movement below minimum coordinate bounds
903
 #define MIN_SOFTWARE_ENDSTOPS
912
 #define MIN_SOFTWARE_ENDSTOPS
904
-// If enabled, axes won't move above MAX_POS in response to movement commands.
913
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
914
+  #define MIN_SOFTWARE_ENDSTOP_X
915
+  #define MIN_SOFTWARE_ENDSTOP_Y
916
+  #define MIN_SOFTWARE_ENDSTOP_Z
917
+#endif
918
+
919
+// Max software endstops curtail movement above maximum coordinate bounds
905
 #define MAX_SOFTWARE_ENDSTOPS
920
 #define MAX_SOFTWARE_ENDSTOPS
921
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
922
+  #define MAX_SOFTWARE_ENDSTOP_X
923
+  #define MAX_SOFTWARE_ENDSTOP_Y
924
+  #define MAX_SOFTWARE_ENDSTOP_Z
925
+#endif
906
 
926
 
907
 /**
927
 /**
908
  * Filament Runout Sensor
928
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

899
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
899
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
900
 #define Z_MAX_POS MANUAL_Z_HOME_POS
900
 #define Z_MAX_POS MANUAL_Z_HOME_POS
901
 
901
 
902
-// If enabled, axes won't move below MIN_POS in response to movement commands.
902
+/**
903
+ * Software Endstops
904
+ *
905
+ * - Prevent moves outside the set machine bounds.
906
+ * - Individual axes can be disabled, if desired.
907
+ * - X and Y only apply to Cartesian robots.
908
+ * - Use 'M211' to set software endstops on/off or report current state
909
+ */
910
+
911
+// Min software endstops curtail movement below minimum coordinate bounds
903
 #define MIN_SOFTWARE_ENDSTOPS
912
 #define MIN_SOFTWARE_ENDSTOPS
904
-// If enabled, axes won't move above MAX_POS in response to movement commands.
913
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
914
+  #define MIN_SOFTWARE_ENDSTOP_X
915
+  #define MIN_SOFTWARE_ENDSTOP_Y
916
+  #define MIN_SOFTWARE_ENDSTOP_Z
917
+#endif
918
+
919
+// Max software endstops curtail movement above maximum coordinate bounds
905
 #define MAX_SOFTWARE_ENDSTOPS
920
 #define MAX_SOFTWARE_ENDSTOPS
921
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
922
+  #define MAX_SOFTWARE_ENDSTOP_X
923
+  #define MAX_SOFTWARE_ENDSTOP_Y
924
+  #define MAX_SOFTWARE_ENDSTOP_Z
925
+#endif
906
 
926
 
907
 /**
927
 /**
908
  * Filament Runout Sensor
928
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

908
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
908
 #define Y_MAX_POS DELTA_PRINTABLE_RADIUS
909
 #define Z_MAX_POS MANUAL_Z_HOME_POS
909
 #define Z_MAX_POS MANUAL_Z_HOME_POS
910
 
910
 
911
-// If enabled, axes won't move below MIN_POS in response to movement commands.
911
+/**
912
+ * Software Endstops
913
+ *
914
+ * - Prevent moves outside the set machine bounds.
915
+ * - Individual axes can be disabled, if desired.
916
+ * - X and Y only apply to Cartesian robots.
917
+ * - Use 'M211' to set software endstops on/off or report current state
918
+ */
919
+
920
+// Min software endstops curtail movement below minimum coordinate bounds
912
 //#define MIN_SOFTWARE_ENDSTOPS
921
 //#define MIN_SOFTWARE_ENDSTOPS
913
-// If enabled, axes won't move above MAX_POS in response to movement commands.
922
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
923
+  #define MIN_SOFTWARE_ENDSTOP_X
924
+  #define MIN_SOFTWARE_ENDSTOP_Y
925
+  #define MIN_SOFTWARE_ENDSTOP_Z
926
+#endif
927
+
928
+// Max software endstops curtail movement above maximum coordinate bounds
914
 #define MAX_SOFTWARE_ENDSTOPS
929
 #define MAX_SOFTWARE_ENDSTOPS
930
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
931
+  #define MAX_SOFTWARE_ENDSTOP_X
932
+  #define MAX_SOFTWARE_ENDSTOP_Y
933
+  #define MAX_SOFTWARE_ENDSTOP_Z
934
+#endif
915
 
935
 
916
 /**
936
 /**
917
  * Filament Runout Sensor
937
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h View File

799
 #define Y_MAX_POS Y_BED_SIZE
799
 #define Y_MAX_POS Y_BED_SIZE
800
 #define Z_MAX_POS 500
800
 #define Z_MAX_POS 500
801
 
801
 
802
-// If enabled, axes won't move below MIN_POS in response to movement commands.
802
+/**
803
+ * Software Endstops
804
+ *
805
+ * - Prevent moves outside the set machine bounds.
806
+ * - Individual axes can be disabled, if desired.
807
+ * - X and Y only apply to Cartesian robots.
808
+ * - Use 'M211' to set software endstops on/off or report current state
809
+ */
810
+
811
+// Min software endstops curtail movement below minimum coordinate bounds
803
 //#define MIN_SOFTWARE_ENDSTOPS
812
 //#define MIN_SOFTWARE_ENDSTOPS
804
-// If enabled, axes won't move above MAX_POS in response to movement commands.
813
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
814
+  #define MIN_SOFTWARE_ENDSTOP_X
815
+  #define MIN_SOFTWARE_ENDSTOP_Y
816
+  #define MIN_SOFTWARE_ENDSTOP_Z
817
+#endif
818
+
819
+// Max software endstops curtail movement above maximum coordinate bounds
805
 #define MAX_SOFTWARE_ENDSTOPS
820
 #define MAX_SOFTWARE_ENDSTOPS
821
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
822
+  #define MAX_SOFTWARE_ENDSTOP_X
823
+  #define MAX_SOFTWARE_ENDSTOP_Y
824
+  #define MAX_SOFTWARE_ENDSTOP_Z
825
+#endif
806
 
826
 
807
 /**
827
 /**
808
  * Filament Runout Sensor
828
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/makibox/Configuration.h View File

788
 #define Y_MAX_POS Y_BED_SIZE
788
 #define Y_MAX_POS Y_BED_SIZE
789
 #define Z_MAX_POS 86
789
 #define Z_MAX_POS 86
790
 
790
 
791
-// If enabled, axes won't move below MIN_POS in response to movement commands.
791
+/**
792
+ * Software Endstops
793
+ *
794
+ * - Prevent moves outside the set machine bounds.
795
+ * - Individual axes can be disabled, if desired.
796
+ * - X and Y only apply to Cartesian robots.
797
+ * - Use 'M211' to set software endstops on/off or report current state
798
+ */
799
+
800
+// Min software endstops curtail movement below minimum coordinate bounds
792
 #define MIN_SOFTWARE_ENDSTOPS
801
 #define MIN_SOFTWARE_ENDSTOPS
793
-// If enabled, axes won't move above MAX_POS in response to movement commands.
802
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
803
+  #define MIN_SOFTWARE_ENDSTOP_X
804
+  #define MIN_SOFTWARE_ENDSTOP_Y
805
+  #define MIN_SOFTWARE_ENDSTOP_Z
806
+#endif
807
+
808
+// Max software endstops curtail movement above maximum coordinate bounds
794
 #define MAX_SOFTWARE_ENDSTOPS
809
 #define MAX_SOFTWARE_ENDSTOPS
810
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
811
+  #define MAX_SOFTWARE_ENDSTOP_X
812
+  #define MAX_SOFTWARE_ENDSTOP_Y
813
+  #define MAX_SOFTWARE_ENDSTOP_Z
814
+#endif
795
 
815
 
796
 /**
816
 /**
797
  * Filament Runout Sensor
817
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

780
 #define Y_MAX_POS Y_BED_SIZE
780
 #define Y_MAX_POS Y_BED_SIZE
781
 #define Z_MAX_POS 120
781
 #define Z_MAX_POS 120
782
 
782
 
783
-// If enabled, axes won't move below MIN_POS in response to movement commands.
783
+/**
784
+ * Software Endstops
785
+ *
786
+ * - Prevent moves outside the set machine bounds.
787
+ * - Individual axes can be disabled, if desired.
788
+ * - X and Y only apply to Cartesian robots.
789
+ * - Use 'M211' to set software endstops on/off or report current state
790
+ */
791
+
792
+// Min software endstops curtail movement below minimum coordinate bounds
784
 #define MIN_SOFTWARE_ENDSTOPS
793
 #define MIN_SOFTWARE_ENDSTOPS
785
-// If enabled, axes won't move above MAX_POS in response to movement commands.
794
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
795
+  #define MIN_SOFTWARE_ENDSTOP_X
796
+  #define MIN_SOFTWARE_ENDSTOP_Y
797
+  #define MIN_SOFTWARE_ENDSTOP_Z
798
+#endif
799
+
800
+// Max software endstops curtail movement above maximum coordinate bounds
786
 #define MAX_SOFTWARE_ENDSTOPS
801
 #define MAX_SOFTWARE_ENDSTOPS
802
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
803
+  #define MAX_SOFTWARE_ENDSTOP_X
804
+  #define MAX_SOFTWARE_ENDSTOP_Y
805
+  #define MAX_SOFTWARE_ENDSTOP_Z
806
+#endif
787
 
807
 
788
 /**
808
 /**
789
  * Filament Runout Sensor
809
  * Filament Runout Sensor

+ 22
- 2
Marlin/example_configurations/wt150/Configuration.h View File

790
 #define Y_MAX_POS Y_BED_SIZE
790
 #define Y_MAX_POS Y_BED_SIZE
791
 #define Z_MAX_POS 143.0
791
 #define Z_MAX_POS 143.0
792
 
792
 
793
-// If enabled, axes won't move below MIN_POS in response to movement commands.
793
+/**
794
+ * Software Endstops
795
+ *
796
+ * - Prevent moves outside the set machine bounds.
797
+ * - Individual axes can be disabled, if desired.
798
+ * - X and Y only apply to Cartesian robots.
799
+ * - Use 'M211' to set software endstops on/off or report current state
800
+ */
801
+
802
+// Min software endstops curtail movement below minimum coordinate bounds
794
 #define MIN_SOFTWARE_ENDSTOPS
803
 #define MIN_SOFTWARE_ENDSTOPS
795
-// If enabled, axes won't move above MAX_POS in response to movement commands.
804
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
805
+  #define MIN_SOFTWARE_ENDSTOP_X
806
+  #define MIN_SOFTWARE_ENDSTOP_Y
807
+  #define MIN_SOFTWARE_ENDSTOP_Z
808
+#endif
809
+
810
+// Max software endstops curtail movement above maximum coordinate bounds
796
 #define MAX_SOFTWARE_ENDSTOPS
811
 #define MAX_SOFTWARE_ENDSTOPS
812
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
813
+  #define MAX_SOFTWARE_ENDSTOP_X
814
+  #define MAX_SOFTWARE_ENDSTOP_Y
815
+  #define MAX_SOFTWARE_ENDSTOP_Z
816
+#endif
797
 
817
 
798
 /**
818
 /**
799
  * Filament Runout Sensor
819
  * Filament Runout Sensor

+ 28
- 10
Marlin/ultralcd.cpp View File

2845
       float min = current_position[axis] - 1000,
2845
       float min = current_position[axis] - 1000,
2846
             max = current_position[axis] + 1000;
2846
             max = current_position[axis] + 1000;
2847
 
2847
 
2848
-      #if HAS_SOFTWARE_ENDSTOPS
2849
-        // Limit to software endstops, if enabled
2850
-        if (soft_endstops_enabled) {
2851
-          #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
2852
-            min = soft_endstop_min[axis];
2853
-          #endif
2854
-          #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
2855
-            max = soft_endstop_max[axis];
2856
-          #endif
2848
+      // Limit to software endstops, if enabled
2849
+      #if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
2850
+        if (soft_endstops_enabled) switch (axis) {
2851
+          case X_AXIS:
2852
+            #if ENABLED(MIN_SOFTWARE_ENDSTOP_X)
2853
+              min = soft_endstop_min[X_AXIS];
2854
+            #endif
2855
+            #if ENABLED(MAX_SOFTWARE_ENDSTOP_X)
2856
+              max = soft_endstop_max[X_AXIS];
2857
+            #endif
2858
+            break;
2859
+          case Y_AXIS:
2860
+            #if ENABLED(MIN_SOFTWARE_ENDSTOP_Y)
2861
+              min = soft_endstop_min[Y_AXIS];
2862
+            #endif
2863
+            #if ENABLED(MAX_SOFTWARE_ENDSTOP_Y)
2864
+              max = soft_endstop_max[Y_AXIS];
2865
+            #endif
2866
+            break;
2867
+          case Z_AXIS:
2868
+            #if ENABLED(MIN_SOFTWARE_ENDSTOP_Z)
2869
+              min = soft_endstop_min[Z_AXIS];
2870
+            #endif
2871
+            #if ENABLED(MAX_SOFTWARE_ENDSTOP_Z)
2872
+              max = soft_endstop_max[Z_AXIS];
2873
+            #endif
2874
+            break;
2857
         }
2875
         }
2858
-      #endif
2876
+      #endif // MIN_SOFTWARE_ENDSTOPS || MAX_SOFTWARE_ENDSTOPS
2859
 
2877
 
2860
       // Delta limits XY based on the current offset from center
2878
       // Delta limits XY based on the current offset from center
2861
       // This assumes the center is 0,0
2879
       // This assumes the center is 0,0

Loading…
Cancel
Save