Skip to content

Commit c1fca91

Browse files
🏗️ Support for up to 6 linear axes (MarlinFirmware#19112)
Co-authored-by: Scott Lahteine <[email protected]>
1 parent d3c56a7 commit c1fca91

File tree

98 files changed

+5030
-2246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+5030
-2246
lines changed

Marlin/Configuration.h

Lines changed: 108 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* Advanced settings can be found in Configuration_adv.h
3737
*/
38-
#define CONFIGURATION_H_VERSION 02000801
38+
#define CONFIGURATION_H_VERSION 02000900
3939

4040
//===========================================================================
4141
//============================= Getting Started =============================
@@ -66,6 +66,14 @@
6666
//
6767
//===========================================================================
6868

69+
//===========================================================================
70+
//=========================== FOAMCUTTER_XYUV ==============================
71+
//===========================================================================
72+
// For a hot wire cutter with parallel horizontal axes X, I where the hights
73+
// of the two wire ends are controlled by parallel axes Y, J.
74+
//
75+
//#define FOAMCUTTER_XYUV
76+
6977
// @section info
7078

7179
// Author info of this build printed to the host during boot and M115
@@ -149,6 +157,45 @@
149157
// Choose your own or use a service like https://www.uuidgenerator.net/version4
150158
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
151159

160+
/**
161+
* Define the number of coordinated linear axes.
162+
* See https://github.com/DerAndere1/Marlin/wiki
163+
* Each linear axis gets its own stepper control and endstop:
164+
*
165+
* Steppers: *_STEP_PIN, *_ENABLE_PIN, *_DIR_PIN, *_ENABLE_ON
166+
* Endstops: *_STOP_PIN, USE_*MIN_PLUG, USE_*MAX_PLUG
167+
* Axes: *_MIN_POS, *_MAX_POS, INVERT_*_DIR
168+
* Planner: DEFAULT_AXIS_STEPS_PER_UNIT, DEFAULT_MAX_FEEDRATE
169+
* DEFAULT_MAX_ACCELERATION, AXIS_RELATIVE_MODES,
170+
* MICROSTEP_MODES, MANUAL_FEEDRATE
171+
*
172+
* :[3, 4, 5, 6]
173+
*/
174+
//#define LINEAR_AXES 3
175+
176+
/**
177+
* Axis codes for additional axes:
178+
* This defines the axis code that is used in G-code commands to
179+
* reference a specific axis.
180+
* 'A' for rotational axis parallel to X
181+
* 'B' for rotational axis parallel to Y
182+
* 'C' for rotational axis parallel to Z
183+
* 'U' for secondary linear axis parallel to X
184+
* 'V' for secondary linear axis parallel to Y
185+
* 'W' for secondary linear axis parallel to Z
186+
* Regardless of the settings, firmware-internal axis IDs are
187+
* I (AXIS4), J (AXIS5), K (AXIS6).
188+
*/
189+
#if LINEAR_AXES >= 4
190+
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
191+
#endif
192+
#if LINEAR_AXES >= 5
193+
#define AXIS5_NAME 'B' // :['A', 'B', 'C', 'U', 'V', 'W']
194+
#endif
195+
#if LINEAR_AXES >= 6
196+
#define AXIS6_NAME 'C' // :['A', 'B', 'C', 'U', 'V', 'W']
197+
#endif
198+
152199
// @section extruder
153200

154201
// This defines the number of extruders
@@ -691,9 +738,15 @@
691738
#define USE_XMIN_PLUG
692739
#define USE_YMIN_PLUG
693740
#define USE_ZMIN_PLUG
741+
//#define USE_IMIN_PLUG
742+
//#define USE_JMIN_PLUG
743+
//#define USE_KMIN_PLUG
694744
//#define USE_XMAX_PLUG
695745
//#define USE_YMAX_PLUG
696746
//#define USE_ZMAX_PLUG
747+
//#define USE_IMAX_PLUG
748+
//#define USE_JMAX_PLUG
749+
//#define USE_KMAX_PLUG
697750

698751
// Enable pullup for all endstops to prevent a floating state
699752
#define ENDSTOPPULLUPS
@@ -702,9 +755,15 @@
702755
//#define ENDSTOPPULLUP_XMAX
703756
//#define ENDSTOPPULLUP_YMAX
704757
//#define ENDSTOPPULLUP_ZMAX
758+
//#define ENDSTOPPULLUP_IMAX
759+
//#define ENDSTOPPULLUP_JMAX
760+
//#define ENDSTOPPULLUP_KMAX
705761
//#define ENDSTOPPULLUP_XMIN
706762
//#define ENDSTOPPULLUP_YMIN
707763
//#define ENDSTOPPULLUP_ZMIN
764+
//#define ENDSTOPPULLUP_IMIN
765+
//#define ENDSTOPPULLUP_JMIN
766+
//#define ENDSTOPPULLUP_KMIN
708767
//#define ENDSTOPPULLUP_ZMIN_PROBE
709768
#endif
710769

@@ -715,19 +774,31 @@
715774
//#define ENDSTOPPULLDOWN_XMAX
716775
//#define ENDSTOPPULLDOWN_YMAX
717776
//#define ENDSTOPPULLDOWN_ZMAX
777+
//#define ENDSTOPPULLDOWN_IMAX
778+
//#define ENDSTOPPULLDOWN_JMAX
779+
//#define ENDSTOPPULLDOWN_KMAX
718780
//#define ENDSTOPPULLDOWN_XMIN
719781
//#define ENDSTOPPULLDOWN_YMIN
720782
//#define ENDSTOPPULLDOWN_ZMIN
783+
//#define ENDSTOPPULLDOWN_IMIN
784+
//#define ENDSTOPPULLDOWN_JMIN
785+
//#define ENDSTOPPULLDOWN_KMIN
721786
//#define ENDSTOPPULLDOWN_ZMIN_PROBE
722787
#endif
723788

724789
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
725790
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
726791
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
727792
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
793+
#define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
794+
#define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
795+
#define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
728796
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
729797
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
730798
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
799+
#define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
800+
#define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
801+
#define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
731802
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
732803

733804
/**
@@ -756,6 +827,9 @@
756827
//#define Z2_DRIVER_TYPE A4988
757828
//#define Z3_DRIVER_TYPE A4988
758829
//#define Z4_DRIVER_TYPE A4988
830+
//#define I_DRIVER_TYPE A4988
831+
//#define J_DRIVER_TYPE A4988
832+
//#define K_DRIVER_TYPE A4988
759833
#define E0_DRIVER_TYPE A4988
760834
//#define E1_DRIVER_TYPE A4988
761835
//#define E2_DRIVER_TYPE A4988
@@ -809,14 +883,14 @@
809883
/**
810884
* Default Axis Steps Per Unit (steps/mm)
811885
* Override with M92
812-
* X, Y, Z, E0 [, E1[, E2...]]
886+
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
813887
*/
814888
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
815889

816890
/**
817891
* Default Max Feed Rate (mm/s)
818892
* Override with M203
819-
* X, Y, Z, E0 [, E1[, E2...]]
893+
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
820894
*/
821895
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
822896

@@ -829,7 +903,7 @@
829903
* Default Max Acceleration (change/s) change = mm/s
830904
* (Maximum start speed for accelerated moves)
831905
* Override with M201
832-
* X, Y, Z, E0 [, E1[, E2...]]
906+
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
833907
*/
834908
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
835909

@@ -863,6 +937,9 @@
863937
#define DEFAULT_XJERK 10.0
864938
#define DEFAULT_YJERK 10.0
865939
#define DEFAULT_ZJERK 0.3
940+
//#define DEFAULT_IJERK 0.3
941+
//#define DEFAULT_JJERK 0.3
942+
//#define DEFAULT_KJERK 0.3
866943

867944
//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
868945

@@ -1177,12 +1254,18 @@
11771254
#define Y_ENABLE_ON 0
11781255
#define Z_ENABLE_ON 0
11791256
#define E_ENABLE_ON 0 // For all extruders
1257+
//#define I_ENABLE_ON 0
1258+
//#define J_ENABLE_ON 0
1259+
//#define K_ENABLE_ON 0
11801260

11811261
// Disable axis steppers immediately when they're not being stepped.
11821262
// WARNING: When motors turn off there is a chance of losing position accuracy!
11831263
#define DISABLE_X false
11841264
#define DISABLE_Y false
11851265
#define DISABLE_Z false
1266+
//#define DISABLE_I false
1267+
//#define DISABLE_J false
1268+
//#define DISABLE_K false
11861269

11871270
// Turn off the display blinking that warns about possible accuracy reduction
11881271
//#define DISABLE_REDUCED_ACCURACY_WARNING
@@ -1198,6 +1281,9 @@
11981281
#define INVERT_X_DIR false
11991282
#define INVERT_Y_DIR true
12001283
#define INVERT_Z_DIR false
1284+
//#define INVERT_I_DIR false
1285+
//#define INVERT_J_DIR false
1286+
//#define INVERT_K_DIR false
12011287

12021288
// @section extruder
12031289

@@ -1233,6 +1319,9 @@
12331319
#define X_HOME_DIR -1
12341320
#define Y_HOME_DIR -1
12351321
#define Z_HOME_DIR -1
1322+
//#define I_HOME_DIR -1
1323+
//#define J_HOME_DIR -1
1324+
//#define K_HOME_DIR -1
12361325

12371326
// @section machine
12381327

@@ -1247,6 +1336,12 @@
12471336
#define X_MAX_POS X_BED_SIZE
12481337
#define Y_MAX_POS Y_BED_SIZE
12491338
#define Z_MAX_POS 200
1339+
//#define I_MIN_POS 0
1340+
//#define I_MAX_POS 50
1341+
//#define J_MIN_POS 0
1342+
//#define J_MAX_POS 50
1343+
//#define K_MIN_POS 0
1344+
//#define K_MAX_POS 50
12501345

12511346
/**
12521347
* Software Endstops
@@ -1263,6 +1358,9 @@
12631358
#define MIN_SOFTWARE_ENDSTOP_X
12641359
#define MIN_SOFTWARE_ENDSTOP_Y
12651360
#define MIN_SOFTWARE_ENDSTOP_Z
1361+
#define MIN_SOFTWARE_ENDSTOP_I
1362+
#define MIN_SOFTWARE_ENDSTOP_J
1363+
#define MIN_SOFTWARE_ENDSTOP_K
12661364
#endif
12671365

12681366
// Max software endstops constrain movement within maximum coordinate bounds
@@ -1271,6 +1369,9 @@
12711369
#define MAX_SOFTWARE_ENDSTOP_X
12721370
#define MAX_SOFTWARE_ENDSTOP_Y
12731371
#define MAX_SOFTWARE_ENDSTOP_Z
1372+
#define MAX_SOFTWARE_ENDSTOP_I
1373+
#define MAX_SOFTWARE_ENDSTOP_J
1374+
#define MAX_SOFTWARE_ENDSTOP_K
12741375
#endif
12751376

12761377
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
@@ -1582,6 +1683,9 @@
15821683
//#define MANUAL_X_HOME_POS 0
15831684
//#define MANUAL_Y_HOME_POS 0
15841685
//#define MANUAL_Z_HOME_POS 0
1686+
//#define MANUAL_I_HOME_POS 0
1687+
//#define MANUAL_J_HOME_POS 0
1688+
//#define MANUAL_K_HOME_POS 0
15851689

15861690
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
15871691
//

0 commit comments

Comments
 (0)