Skip to content

Commit e5b651f

Browse files
✨ Support for up to 9 axes (linear, rotary) (MarlinFirmware#23112)
Co-authored-by: Scott Lahteine <[email protected]>
1 parent 2786592 commit e5b651f

File tree

103 files changed

+4540
-801
lines changed

Some content is hidden

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

103 files changed

+4540
-801
lines changed

Marlin/Configuration.h

+107-31
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 02000903
38+
#define CONFIGURATION_H_VERSION 02010000
3939

4040
//===========================================================================
4141
//============================= Getting Started =============================
@@ -150,9 +150,9 @@
150150
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
151151

152152
/**
153-
* Define the number of coordinated linear axes.
153+
* Define the number of coordinated axes.
154154
* See https://github.com/DerAndere1/Marlin/wiki
155-
* Each linear axis gets its own stepper control and endstop:
155+
* Each axis gets its own stepper control and endstop:
156156
*
157157
* Steppers: *_STEP_PIN, *_ENABLE_PIN, *_DIR_PIN, *_ENABLE_ON
158158
* Endstops: *_STOP_PIN, USE_*MIN_PLUG, USE_*MAX_PLUG
@@ -161,31 +161,50 @@
161161
* DEFAULT_MAX_ACCELERATION, AXIS_RELATIVE_MODES,
162162
* MICROSTEP_MODES, MANUAL_FEEDRATE
163163
*
164-
* :[3, 4, 5, 6]
164+
* :[3, 4, 5, 6, 7, 8, 9]
165165
*/
166-
//#define LINEAR_AXES 3
166+
//#define NUM_AXES 3
167167

168168
/**
169-
* Axis codes for additional axes:
170-
* This defines the axis code that is used in G-code commands to
171-
* reference a specific axis.
172-
* 'A' for rotational axis parallel to X
173-
* 'B' for rotational axis parallel to Y
174-
* 'C' for rotational axis parallel to Z
175-
* 'U' for secondary linear axis parallel to X
176-
* 'V' for secondary linear axis parallel to Y
177-
* 'W' for secondary linear axis parallel to Z
178-
* Regardless of the settings, firmware-internal axis IDs are
179-
* I (AXIS4), J (AXIS5), K (AXIS6).
169+
* Additional Axis Settings
170+
*
171+
* Define AXISn_ROTATES for all axes that rotate or pivot.
172+
* Rotational axis coordinates are expressed in degrees.
173+
*
174+
* AXISn_NAME defines the letter used to refer to the axis in (most) G-code commands.
175+
* By convention the names and roles are typically:
176+
* 'A' : Rotational axis parallel to X
177+
* 'B' : Rotational axis parallel to Y
178+
* 'C' : Rotational axis parallel to Z
179+
* 'U' : Secondary linear axis parallel to X
180+
* 'V' : Secondary linear axis parallel to Y
181+
* 'W' : Secondary linear axis parallel to Z
182+
*
183+
* Regardless of these settings the axes are internally named I, J, K, U, V, W.
180184
*/
181-
#if LINEAR_AXES >= 4
185+
#if NUM_AXES >= 4
182186
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
187+
#define AXIS4_ROTATES
188+
#endif
189+
#if NUM_AXES >= 5
190+
#define AXIS5_NAME 'B' // :['B', 'C', 'U', 'V', 'W']
191+
#define AXIS5_ROTATES
192+
#endif
193+
#if NUM_AXES >= 6
194+
#define AXIS6_NAME 'C' // :['C', 'U', 'V', 'W']
195+
#define AXIS6_ROTATES
196+
#endif
197+
#if NUM_AXES >= 7
198+
#define AXIS7_NAME 'U' // :['U', 'V', 'W']
199+
//#define AXIS7_ROTATES
183200
#endif
184-
#if LINEAR_AXES >= 5
185-
#define AXIS5_NAME 'B' // :['A', 'B', 'C', 'U', 'V', 'W']
201+
#if NUM_AXES >= 8
202+
#define AXIS8_NAME 'V' // :['V', 'W']
203+
//#define AXIS8_ROTATES
186204
#endif
187-
#if LINEAR_AXES >= 6
188-
#define AXIS6_NAME 'C' // :['A', 'B', 'C', 'U', 'V', 'W']
205+
#if NUM_AXES >= 9
206+
#define AXIS9_NAME 'W' // :['W']
207+
//#define AXIS9_ROTATES
189208
#endif
190209

191210
// @section extruder
@@ -793,12 +812,18 @@
793812
//#define USE_IMIN_PLUG
794813
//#define USE_JMIN_PLUG
795814
//#define USE_KMIN_PLUG
815+
//#define USE_UMIN_PLUG
816+
//#define USE_VMIN_PLUG
817+
//#define USE_WMIN_PLUG
796818
//#define USE_XMAX_PLUG
797819
//#define USE_YMAX_PLUG
798820
//#define USE_ZMAX_PLUG
799821
//#define USE_IMAX_PLUG
800822
//#define USE_JMAX_PLUG
801823
//#define USE_KMAX_PLUG
824+
//#define USE_UMAX_PLUG
825+
//#define USE_VMAX_PLUG
826+
//#define USE_WMAX_PLUG
802827

803828
// Enable pullup for all endstops to prevent a floating state
804829
#define ENDSTOPPULLUPS
@@ -810,12 +835,18 @@
810835
//#define ENDSTOPPULLUP_IMIN
811836
//#define ENDSTOPPULLUP_JMIN
812837
//#define ENDSTOPPULLUP_KMIN
838+
//#define ENDSTOPPULLUP_UMIN
839+
//#define ENDSTOPPULLUP_VMIN
840+
//#define ENDSTOPPULLUP_WMIN
813841
//#define ENDSTOPPULLUP_XMAX
814842
//#define ENDSTOPPULLUP_YMAX
815843
//#define ENDSTOPPULLUP_ZMAX
816844
//#define ENDSTOPPULLUP_IMAX
817845
//#define ENDSTOPPULLUP_JMAX
818846
//#define ENDSTOPPULLUP_KMAX
847+
//#define ENDSTOPPULLUP_UMAX
848+
//#define ENDSTOPPULLUP_VMAX
849+
//#define ENDSTOPPULLUP_WMAX
819850
//#define ENDSTOPPULLUP_ZMIN_PROBE
820851
#endif
821852

@@ -829,12 +860,18 @@
829860
//#define ENDSTOPPULLDOWN_IMIN
830861
//#define ENDSTOPPULLDOWN_JMIN
831862
//#define ENDSTOPPULLDOWN_KMIN
863+
//#define ENDSTOPPULLDOWN_UMIN
864+
//#define ENDSTOPPULLDOWN_VMIN
865+
//#define ENDSTOPPULLDOWN_WMIN
832866
//#define ENDSTOPPULLDOWN_XMAX
833867
//#define ENDSTOPPULLDOWN_YMAX
834868
//#define ENDSTOPPULLDOWN_ZMAX
835869
//#define ENDSTOPPULLDOWN_IMAX
836870
//#define ENDSTOPPULLDOWN_JMAX
837871
//#define ENDSTOPPULLDOWN_KMAX
872+
//#define ENDSTOPPULLDOWN_UMAX
873+
//#define ENDSTOPPULLDOWN_VMAX
874+
//#define ENDSTOPPULLDOWN_WMAX
838875
//#define ENDSTOPPULLDOWN_ZMIN_PROBE
839876
#endif
840877

@@ -845,12 +882,18 @@
845882
#define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
846883
#define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
847884
#define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
885+
#define U_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
886+
#define V_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
887+
#define W_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
848888
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
849889
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
850890
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
851891
#define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
852892
#define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
853893
#define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
894+
#define U_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
895+
#define V_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
896+
#define W_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
854897
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
855898

856899
/**
@@ -882,6 +925,9 @@
882925
//#define I_DRIVER_TYPE A4988
883926
//#define J_DRIVER_TYPE A4988
884927
//#define K_DRIVER_TYPE A4988
928+
//#define U_DRIVER_TYPE A4988
929+
//#define V_DRIVER_TYPE A4988
930+
//#define W_DRIVER_TYPE A4988
885931
#define E0_DRIVER_TYPE A4988
886932
//#define E1_DRIVER_TYPE A4988
887933
//#define E2_DRIVER_TYPE A4988
@@ -933,16 +979,16 @@
933979
//#define DISTINCT_E_FACTORS
934980

935981
/**
936-
* Default Axis Steps Per Unit (steps/mm)
982+
* Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
937983
* Override with M92
938-
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
984+
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
939985
*/
940986
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 500 }
941987

942988
/**
943-
* Default Max Feed Rate (mm/s)
989+
* Default Max Feed Rate (linear=mm/s, rotational=°/s)
944990
* Override with M203
945-
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
991+
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
946992
*/
947993
#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 }
948994

@@ -952,10 +998,10 @@
952998
#endif
953999

9541000
/**
955-
* Default Max Acceleration (change/s) change = mm/s
1001+
* Default Max Acceleration (speed change with time) (linear=mm/(s^2), rotational=°/(s^2))
9561002
* (Maximum start speed for accelerated moves)
9571003
* Override with M201
958-
* X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]]
1004+
* X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
9591005
*/
9601006
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 }
9611007

@@ -965,7 +1011,7 @@
9651011
#endif
9661012

9671013
/**
968-
* Default Acceleration (change/s) change = mm/s
1014+
* Default Acceleration (speed change with time) (linear=mm/(s^2), rotational=°/(s^2))
9691015
* Override with M204
9701016
*
9711017
* M204 P Acceleration
@@ -978,7 +1024,7 @@
9781024

9791025
/**
9801026
* Default Jerk limits (mm/s)
981-
* Override with M205 X Y Z E
1027+
* Override with M205 X Y Z . . . E
9821028
*
9831029
* "Jerk" specifies the minimum speed change that requires acceleration.
9841030
* When changing speed and direction, if the difference is less than the
@@ -992,6 +1038,9 @@
9921038
//#define DEFAULT_IJERK 0.3
9931039
//#define DEFAULT_JJERK 0.3
9941040
//#define DEFAULT_KJERK 0.3
1041+
//#define DEFAULT_UJERK 0.3
1042+
//#define DEFAULT_VJERK 0.3
1043+
//#define DEFAULT_WJERK 0.3
9951044

9961045
//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
9971046

@@ -1330,6 +1379,9 @@
13301379
//#define I_ENABLE_ON 0
13311380
//#define J_ENABLE_ON 0
13321381
//#define K_ENABLE_ON 0
1382+
//#define U_ENABLE_ON 0
1383+
//#define V_ENABLE_ON 0
1384+
//#define W_ENABLE_ON 0
13331385

13341386
// Disable axis steppers immediately when they're not being stepped.
13351387
// WARNING: When motors turn off there is a chance of losing position accuracy!
@@ -1339,6 +1391,9 @@
13391391
//#define DISABLE_I false
13401392
//#define DISABLE_J false
13411393
//#define DISABLE_K false
1394+
//#define DISABLE_U false
1395+
//#define DISABLE_V false
1396+
//#define DISABLE_W false
13421397

13431398
// Turn off the display blinking that warns about possible accuracy reduction
13441399
//#define DISABLE_REDUCED_ACCURACY_WARNING
@@ -1357,6 +1412,9 @@
13571412
//#define INVERT_I_DIR false
13581413
//#define INVERT_J_DIR false
13591414
//#define INVERT_K_DIR false
1415+
//#define INVERT_U_DIR false
1416+
//#define INVERT_V_DIR false
1417+
//#define INVERT_W_DIR false
13601418

13611419
// @section extruder
13621420

@@ -1395,14 +1453,17 @@
13951453
//#define I_HOME_DIR -1
13961454
//#define J_HOME_DIR -1
13971455
//#define K_HOME_DIR -1
1456+
//#define U_HOME_DIR -1
1457+
//#define V_HOME_DIR -1
1458+
//#define W_HOME_DIR -1
13981459

13991460
// @section machine
14001461

14011462
// The size of the printable area
14021463
#define X_BED_SIZE 200
14031464
#define Y_BED_SIZE 200
14041465

1405-
// Travel limits (mm) after homing, corresponding to endstop positions.
1466+
// Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions.
14061467
#define X_MIN_POS 0
14071468
#define Y_MIN_POS 0
14081469
#define Z_MIN_POS 0
@@ -1415,6 +1476,12 @@
14151476
//#define J_MAX_POS 50
14161477
//#define K_MIN_POS 0
14171478
//#define K_MAX_POS 50
1479+
//#define U_MIN_POS 0
1480+
//#define U_MAX_POS 50
1481+
//#define V_MIN_POS 0
1482+
//#define V_MAX_POS 50
1483+
//#define W_MIN_POS 0
1484+
//#define W_MAX_POS 50
14181485

14191486
/**
14201487
* Software Endstops
@@ -1434,6 +1501,9 @@
14341501
#define MIN_SOFTWARE_ENDSTOP_I
14351502
#define MIN_SOFTWARE_ENDSTOP_J
14361503
#define MIN_SOFTWARE_ENDSTOP_K
1504+
#define MIN_SOFTWARE_ENDSTOP_U
1505+
#define MIN_SOFTWARE_ENDSTOP_V
1506+
#define MIN_SOFTWARE_ENDSTOP_W
14371507
#endif
14381508

14391509
// Max software endstops constrain movement within maximum coordinate bounds
@@ -1445,6 +1515,9 @@
14451515
#define MAX_SOFTWARE_ENDSTOP_I
14461516
#define MAX_SOFTWARE_ENDSTOP_J
14471517
#define MAX_SOFTWARE_ENDSTOP_K
1518+
#define MAX_SOFTWARE_ENDSTOP_U
1519+
#define MAX_SOFTWARE_ENDSTOP_V
1520+
#define MAX_SOFTWARE_ENDSTOP_W
14481521
#endif
14491522

14501523
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
@@ -1759,6 +1832,9 @@
17591832
//#define MANUAL_I_HOME_POS 0
17601833
//#define MANUAL_J_HOME_POS 0
17611834
//#define MANUAL_K_HOME_POS 0
1835+
//#define MANUAL_U_HOME_POS 0
1836+
//#define MANUAL_V_HOME_POS 0
1837+
//#define MANUAL_W_HOME_POS 0
17621838

17631839
/**
17641840
* Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
@@ -1774,7 +1850,7 @@
17741850
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // Y point for Z homing
17751851
#endif
17761852

1777-
// Homing speeds (mm/min)
1853+
// Homing speeds (linear=mm/min, rotational=°/min)
17781854
#define HOMING_FEEDRATE_MM_M { (50*60), (50*60), (4*60) }
17791855

17801856
// Validate that endstops are triggered on homing moves

0 commit comments

Comments
 (0)