Browse Source

Merge pull request #4271 from thinkyhead/rc_X_DUAL_STEPPER_DRIVERS

X_DUAL_STEPPER_DRIVERS
Scott Lahteine 9 years ago
parent
commit
243ad4312a

+ 21
- 12
Marlin/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 34
- 38
Marlin/Marlin.h View File

@@ -134,73 +134,69 @@ void manage_inactivity(bool ignore_stepper_queue = false);
134 134
   extern bool extruder_duplication_enabled;
135 135
 #endif
136 136
 
137
-#if ENABLED(DUAL_X_CARRIAGE) && HAS_X_ENABLE && HAS_X2_ENABLE
138
-  #define  enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
139
-  #define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; } while (0)
137
+#if HAS_X2_ENABLE
138
+  #define  enable_x() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
139
+  #define disable_x() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
140 140
 #elif HAS_X_ENABLE
141 141
   #define  enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
142
-  #define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }
142
+  #define disable_x() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
143 143
 #else
144
-  #define enable_x() ;
145
-  #define disable_x() ;
144
+  #define  enable_x() NOOP
145
+  #define disable_x() NOOP
146 146
 #endif
147 147
 
148
-#if HAS_Y_ENABLE
149
-  #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
150
-    #define  enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
151
-    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
152
-  #else
153
-    #define  enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
154
-    #define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }
155
-  #endif
148
+#if HAS_Y2_ENABLE
149
+  #define  enable_y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0)
150
+  #define disable_y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
151
+#elif HAS_Y_ENABLE
152
+  #define  enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
153
+  #define disable_y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
156 154
 #else
157
-  #define enable_y() ;
158
-  #define disable_y() ;
155
+  #define  enable_y() NOOP
156
+  #define disable_y() NOOP
159 157
 #endif
160 158
 
161
-#if HAS_Z_ENABLE
162
-  #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
163
-    #define  enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
164
-    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
165
-  #else
166
-    #define  enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
167
-    #define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }
168
-  #endif
159
+#if HAS_Z2_ENABLE
160
+  #define  enable_z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0)
161
+  #define disable_z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
162
+#elif HAS_Z_ENABLE
163
+  #define  enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
164
+  #define disable_z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
169 165
 #else
170
-  #define enable_z() ;
171
-  #define disable_z() ;
166
+  #define  enable_z() NOOP
167
+  #define disable_z() NOOP
172 168
 #endif
173 169
 
174 170
 #if HAS_E0_ENABLE
175
-  #define enable_e0()  E0_ENABLE_WRITE( E_ENABLE_ON)
171
+  #define  enable_e0() E0_ENABLE_WRITE( E_ENABLE_ON)
176 172
   #define disable_e0() E0_ENABLE_WRITE(!E_ENABLE_ON)
177 173
 #else
178
-  #define enable_e0()  /* nothing */
179
-  #define disable_e0() /* nothing */
174
+  #define  enable_e0() NOOP
175
+  #define disable_e0() NOOP
180 176
 #endif
181 177
 
182 178
 #if (EXTRUDERS > 1) && HAS_E1_ENABLE
183
-  #define enable_e1()  E1_ENABLE_WRITE( E_ENABLE_ON)
179
+  #define  enable_e1() E1_ENABLE_WRITE( E_ENABLE_ON)
184 180
   #define disable_e1() E1_ENABLE_WRITE(!E_ENABLE_ON)
185 181
 #else
186
-  #define enable_e1()  /* nothing */
187
-  #define disable_e1() /* nothing */
182
+  #define  enable_e1() NOOP
183
+  #define disable_e1() NOOP
188 184
 #endif
189 185
 
190 186
 #if (EXTRUDERS > 2) && HAS_E2_ENABLE
191
-  #define enable_e2()  E2_ENABLE_WRITE( E_ENABLE_ON)
187
+  #define  enable_e2() E2_ENABLE_WRITE( E_ENABLE_ON)
192 188
   #define disable_e2() E2_ENABLE_WRITE(!E_ENABLE_ON)
193 189
 #else
194
-  #define enable_e2()  /* nothing */
195
-  #define disable_e2() /* nothing */
190
+  #define  enable_e2() NOOP
191
+  #define disable_e2() NOOP
196 192
 #endif
197 193
 
198 194
 #if (EXTRUDERS > 3) && HAS_E3_ENABLE
199
-  #define enable_e3()  E3_ENABLE_WRITE( E_ENABLE_ON)
195
+  #define  enable_e3() E3_ENABLE_WRITE( E_ENABLE_ON)
200 196
   #define disable_e3() E3_ENABLE_WRITE(!E_ENABLE_ON)
201 197
 #else
202
-  #define enable_e3()  /* nothing */
203
-  #define disable_e3() /* nothing */
198
+  #define  enable_e3() NOOP
199
+  #define disable_e3() NOOP
204 200
 #endif
205 201
 
206 202
 /**

+ 8
- 10
Marlin/SanityCheck.h View File

@@ -76,8 +76,14 @@
76 76
 /**
77 77
  * Dual Stepper Drivers
78 78
  */
79
-#if ENABLED(Z_DUAL_STEPPER_DRIVERS) && ENABLED(Y_DUAL_STEPPER_DRIVERS)
80
-  #error "You cannot have dual stepper drivers for both Y and Z."
79
+#if ENABLED(X_DUAL_STEPPER_DRIVERS) && ENABLED(DUAL_X_CARRIAGE)
80
+  #error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
81
+#elif ENABLED(X_DUAL_STEPPER_DRIVERS) && (!HAS_X2_ENABLE || !HAS_X2_STEP || !HAS_X2_DIR)
82
+  #error "X_DUAL_STEPPER_DRIVERS requires X2 pins (and an extra E plug)."
83
+#elif ENABLED(Y_DUAL_STEPPER_DRIVERS) && (!HAS_Y2_ENABLE || !HAS_Y2_STEP || !HAS_Y2_DIR)
84
+  #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins (and an extra E plug)."
85
+#elif ENABLED(Z_DUAL_STEPPER_DRIVERS) && (!HAS_Z2_ENABLE || !HAS_Z2_STEP || !HAS_Z2_DIR)
86
+  #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."
81 87
 #endif
82 88
 
83 89
 /**
@@ -152,14 +158,6 @@
152 158
     #error "EXTRUDERS must be 1 with HEATERS_PARALLEL."
153 159
   #endif
154 160
 
155
-  #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
156
-    #error "EXTRUDERS must be 1 with Y_DUAL_STEPPER_DRIVERS."
157
-  #endif
158
-
159
-  #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
160
-    #error "EXTRUDERS must be 1 with Z_DUAL_STEPPER_DRIVERS."
161
-  #endif
162
-
163 161
 #elif ENABLED(SINGLENOZZLE)
164 162
   #error "SINGLENOZZLE requires 2 or more EXTRUDERS."
165 163
 #endif

+ 21
- 12
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -235,11 +235,28 @@
235 235
 
236 236
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
237 237
 
238
+// Dual X Steppers
239
+// Uncomment this option to drive two X axis motors.
240
+// The next unused E driver will be assigned to the second X stepper.
241
+//#define X_DUAL_STEPPER_DRIVERS
242
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
243
+  // Set true if the two X motors need to rotate in opposite directions
244
+  #define INVERT_X2_VS_X_DIR true
245
+#endif
246
+
247
+
248
+// Dual Y Steppers
249
+// Uncomment this option to drive two Y axis motors.
250
+// The next unused E driver will be assigned to the second Y stepper.
251
+//#define Y_DUAL_STEPPER_DRIVERS
252
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
253
+  // Set true if the two Y motors need to rotate in opposite directions
254
+  #define INVERT_Y2_VS_Y_DIR true
255
+#endif
256
+
238 257
 // A single Z stepper driver is usually used to drive 2 stepper motors.
239
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
240
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
241
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
242
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
258
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
259
+// The next unused E driver will be assigned to the second Z stepper.
243 260
 //#define Z_DUAL_STEPPER_DRIVERS
244 261
 
245 262
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -261,14 +278,6 @@
261 278
 
262 279
 #endif // Z_DUAL_STEPPER_DRIVERS
263 280
 
264
-// Same again but for Y Axis.
265
-//#define Y_DUAL_STEPPER_DRIVERS
266
-
267
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
268
-  // Define if the two Y drives need to rotate in opposite directions
269
-  #define INVERT_Y2_VS_Y_DIR true
270
-#endif
271
-
272 281
 // Enable this for dual x-carriage printers.
273 282
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
274 283
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -237,11 +237,28 @@
237 237
 
238 238
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
239 239
 
240
+// Dual X Steppers
241
+// Uncomment this option to drive two X axis motors.
242
+// The next unused E driver will be assigned to the second X stepper.
243
+//#define X_DUAL_STEPPER_DRIVERS
244
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
245
+  // Set true if the two X motors need to rotate in opposite directions
246
+  #define INVERT_X2_VS_X_DIR true
247
+#endif
248
+
249
+
250
+// Dual Y Steppers
251
+// Uncomment this option to drive two Y axis motors.
252
+// The next unused E driver will be assigned to the second Y stepper.
253
+//#define Y_DUAL_STEPPER_DRIVERS
254
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
255
+  // Set true if the two Y motors need to rotate in opposite directions
256
+  #define INVERT_Y2_VS_Y_DIR true
257
+#endif
258
+
240 259
 // A single Z stepper driver is usually used to drive 2 stepper motors.
241
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
242
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
243
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
244
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
260
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
261
+// The next unused E driver will be assigned to the second Z stepper.
245 262
 //#define Z_DUAL_STEPPER_DRIVERS
246 263
 
247 264
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -263,14 +280,6 @@
263 280
 
264 281
 #endif // Z_DUAL_STEPPER_DRIVERS
265 282
 
266
-// Same again but for Y Axis.
267
-//#define Y_DUAL_STEPPER_DRIVERS
268
-
269
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
270
-  // Define if the two Y drives need to rotate in opposite directions
271
-  #define INVERT_Y2_VS_Y_DIR true
272
-#endif
273
-
274 283
 // Enable this for dual x-carriage printers.
275 284
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
276 285
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -234,11 +234,28 @@
234 234
 
235 235
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
236 236
 
237
+// Dual X Steppers
238
+// Uncomment this option to drive two X axis motors.
239
+// The next unused E driver will be assigned to the second X stepper.
240
+//#define X_DUAL_STEPPER_DRIVERS
241
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
242
+  // Set true if the two X motors need to rotate in opposite directions
243
+  #define INVERT_X2_VS_X_DIR true
244
+#endif
245
+
246
+
247
+// Dual Y Steppers
248
+// Uncomment this option to drive two Y axis motors.
249
+// The next unused E driver will be assigned to the second Y stepper.
250
+//#define Y_DUAL_STEPPER_DRIVERS
251
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
252
+  // Set true if the two Y motors need to rotate in opposite directions
253
+  #define INVERT_Y2_VS_Y_DIR true
254
+#endif
255
+
237 256
 // A single Z stepper driver is usually used to drive 2 stepper motors.
238
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
239
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
240
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
241
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
257
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
258
+// The next unused E driver will be assigned to the second Z stepper.
242 259
 //#define Z_DUAL_STEPPER_DRIVERS
243 260
 
244 261
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -260,14 +277,6 @@
260 277
 
261 278
 #endif // Z_DUAL_STEPPER_DRIVERS
262 279
 
263
-// Same again but for Y Axis.
264
-//#define Y_DUAL_STEPPER_DRIVERS
265
-
266
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
267
-  // Define if the two Y drives need to rotate in opposite directions
268
-  #define INVERT_Y2_VS_Y_DIR true
269
-#endif
270
-
271 280
 // Enable this for dual x-carriage printers.
272 281
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
273 282
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 21
- 12
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -229,11 +229,28 @@
229 229
 
230 230
 //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
231 231
 
232
+// Dual X Steppers
233
+// Uncomment this option to drive two X axis motors.
234
+// The next unused E driver will be assigned to the second X stepper.
235
+//#define X_DUAL_STEPPER_DRIVERS
236
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
237
+  // Set true if the two X motors need to rotate in opposite directions
238
+  #define INVERT_X2_VS_X_DIR true
239
+#endif
240
+
241
+
242
+// Dual Y Steppers
243
+// Uncomment this option to drive two Y axis motors.
244
+// The next unused E driver will be assigned to the second Y stepper.
245
+//#define Y_DUAL_STEPPER_DRIVERS
246
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
247
+  // Set true if the two Y motors need to rotate in opposite directions
248
+  #define INVERT_Y2_VS_Y_DIR true
249
+#endif
250
+
232 251
 // A single Z stepper driver is usually used to drive 2 stepper motors.
233
-// Uncomment this define to utilize a separate stepper driver for each Z axis motor.
234
-// Only a few motherboards support this, like RAMPS, which have dual extruder support (the 2nd, often unused, extruder driver is used
235
-// to control the 2nd Z axis stepper motor). The pins are currently only defined for a RAMPS motherboards.
236
-// On a RAMPS (or other 5 driver) motherboard, using this feature will limit you to using 1 extruder.
252
+// Uncomment this option to use a separate stepper driver for each Z axis motor.
253
+// The next unused E driver will be assigned to the second Z stepper.
237 254
 //#define Z_DUAL_STEPPER_DRIVERS
238 255
 
239 256
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
@@ -255,14 +272,6 @@
255 272
 
256 273
 #endif // Z_DUAL_STEPPER_DRIVERS
257 274
 
258
-// Same again but for Y Axis.
259
-//#define Y_DUAL_STEPPER_DRIVERS
260
-
261
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
262
-  // Define if the two Y drives need to rotate in opposite directions
263
-  #define INVERT_Y2_VS_Y_DIR true
264
-#endif
265
-
266 275
 // Enable this for dual x-carriage printers.
267 276
 // A dual x-carriage design has the advantage that the inactive extruder can be parked which
268 277
 // prevents hot-end ooze contaminating the print. It also reduces the weight of each x-carriage

+ 19
- 12
Marlin/pins.h View File

@@ -369,8 +369,8 @@
369 369
 #define __EPIN(p,q) E##p##_##q##_PIN
370 370
 #define _EPIN(p,q) __EPIN(p,q)
371 371
 
372
-#if ENABLED(DUAL_X_CARRIAGE)
373
-  // The X2 axis, if any, should be the next open extruder port
372
+// The X2 axis, if any, should be the next open extruder port
373
+#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_DUAL_STEPPER_DRIVERS)
374 374
   #ifndef X2_STEP_PIN
375 375
     #define X2_STEP_PIN   _EPIN(EXTRUDERS, STEP)
376 376
     #define X2_DIR_PIN    _EPIN(EXTRUDERS, DIR)
@@ -378,25 +378,32 @@
378 378
   #endif
379 379
   #undef _X2_PINS
380 380
   #define _X2_PINS X2_STEP_PIN, X2_DIR_PIN, X2_ENABLE_PIN,
381
-  #define Y2_Z2_E_INDEX INCREMENT(EXTRUDERS)
381
+  #define Y2_E_INDEX INCREMENT(EXTRUDERS)
382 382
 #else
383
-  #define Y2_Z2_E_INDEX EXTRUDERS
383
+  #define Y2_E_INDEX EXTRUDERS
384 384
 #endif
385 385
 
386 386
 // The Y2 axis, if any, should be the next open extruder port
387
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_STEP_PIN)
388
-  #define Y2_STEP_PIN   _EPIN(Y2_Z2_E_INDEX, STEP)
389
-  #define Y2_DIR_PIN    _EPIN(Y2_Z2_E_INDEX, DIR)
390
-  #define Y2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
387
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
388
+  #ifndef Y2_STEP_PIN
389
+    #define Y2_STEP_PIN   _EPIN(Y2_E_INDEX, STEP)
390
+    #define Y2_DIR_PIN    _EPIN(Y2_E_INDEX, DIR)
391
+    #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE)
392
+  #endif
391 393
   #undef _Y2_PINS
392 394
   #define _Y2_PINS Y2_STEP_PIN, Y2_DIR_PIN, Y2_ENABLE_PIN,
395
+  #define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
396
+#else
397
+  #define Z2_E_INDEX Y2_E_INDEX
393 398
 #endif
394 399
 
395 400
 // The Z2 axis, if any, should be the next open extruder port
396
-#if ENABLED(Z_DUAL_STEPPER_DRIVERS) && !defined(Z2_STEP_PIN)
397
-  #define Z2_STEP_PIN   _EPIN(Y2_Z2_E_INDEX, STEP)
398
-  #define Z2_DIR_PIN    _EPIN(Y2_Z2_E_INDEX, DIR)
399
-  #define Z2_ENABLE_PIN _EPIN(Y2_Z2_E_INDEX, ENABLE)
401
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
402
+  #ifndef Z2_STEP_PIN
403
+    #define Z2_STEP_PIN   _EPIN(Z2_E_INDEX, STEP)
404
+    #define Z2_DIR_PIN    _EPIN(Z2_E_INDEX, DIR)
405
+    #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE)
406
+  #endif
400 407
   #undef _Z2_PINS
401 408
   #define _Z2_PINS Z2_STEP_PIN, Z2_DIR_PIN, Z2_ENABLE_PIN,
402 409
 #endif

+ 14
- 10
Marlin/stepper.cpp View File

@@ -120,7 +120,10 @@ unsigned short Stepper::OCR1A_nominal;
120 120
 
121 121
 volatile long Stepper::endstops_trigsteps[3];
122 122
 
123
-#if ENABLED(DUAL_X_CARRIAGE)
123
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
124
+  #define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) != INVERT_X2_VS_X_DIR); }while(0)
125
+  #define X_APPLY_STEP(v,Q) do{ X_STEP_WRITE(v); X2_STEP_WRITE(v); }while(0)
126
+#elif ENABLED(DUAL_X_CARRIAGE)
124 127
   #define X_APPLY_DIR(v,ALWAYS) \
125 128
     if (extruder_duplication_enabled || ALWAYS) { \
126 129
       X_DIR_WRITE(v); \
@@ -143,15 +146,15 @@ volatile long Stepper::endstops_trigsteps[3];
143 146
 #endif
144 147
 
145 148
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
146
-  #define Y_APPLY_DIR(v,Q) { Y_DIR_WRITE(v); Y2_DIR_WRITE((v) != INVERT_Y2_VS_Y_DIR); }
147
-  #define Y_APPLY_STEP(v,Q) { Y_STEP_WRITE(v); Y2_STEP_WRITE(v); }
149
+  #define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) != INVERT_Y2_VS_Y_DIR); }while(0)
150
+  #define Y_APPLY_STEP(v,Q) do{ Y_STEP_WRITE(v); Y2_STEP_WRITE(v); }while(0)
148 151
 #else
149 152
   #define Y_APPLY_DIR(v,Q) Y_DIR_WRITE(v)
150 153
   #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
151 154
 #endif
152 155
 
153 156
 #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
154
-  #define Z_APPLY_DIR(v,Q) { Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }
157
+  #define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE(v); }while(0)
155 158
   #if ENABLED(Z_DUAL_ENDSTOPS)
156 159
     #define Z_APPLY_STEP(v,Q) \
157 160
     if (performing_homing) { \
@@ -169,7 +172,7 @@ volatile long Stepper::endstops_trigsteps[3];
169 172
       Z2_STEP_WRITE(v); \
170 173
     }
171 174
   #else
172
-    #define Z_APPLY_STEP(v,Q) { Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }
175
+    #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }while(0)
173 176
   #endif
174 177
 #else
175 178
   #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v)
@@ -669,14 +672,15 @@ void Stepper::init() {
669 672
 
670 673
   // Initialize Step Pins
671 674
   #if HAS_X_STEP
672
-    AXIS_INIT(x, X, X);
673
-    #if ENABLED(DUAL_X_CARRIAGE) && HAS_X2_STEP
674
-      AXIS_INIT(x, X2, X);
675
+    #if ENABLED(X_DUAL_STEPPER_DRIVERS) || ENABLED(DUAL_X_CARRIAGE)
676
+      X2_STEP_INIT;
677
+      X2_STEP_WRITE(INVERT_X_STEP_PIN);
675 678
     #endif
679
+    AXIS_INIT(x, X, X);
676 680
   #endif
677 681
 
678 682
   #if HAS_Y_STEP
679
-    #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_STEP
683
+    #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
680 684
       Y2_STEP_INIT;
681 685
       Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
682 686
     #endif
@@ -684,7 +688,7 @@ void Stepper::init() {
684 688
   #endif
685 689
 
686 690
   #if HAS_Z_STEP
687
-    #if ENABLED(Z_DUAL_STEPPER_DRIVERS) && HAS_Z2_STEP
691
+    #if ENABLED(Z_DUAL_STEPPER_DRIVERS)
688 692
       Z2_STEP_INIT;
689 693
       Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
690 694
     #endif

+ 3
- 3
Marlin/stepper_indirection.h View File

@@ -60,7 +60,7 @@
60 60
 #define X_ENABLE_READ READ(X_ENABLE_PIN)
61 61
 
62 62
 // X2 motor
63
-#if ENABLED(DUAL_X_CARRIAGE)
63
+#if HAS_X2_ENABLE
64 64
   #define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
65 65
   #define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE)
66 66
   #define X2_STEP_READ READ(X2_STEP_PIN)
@@ -88,7 +88,7 @@
88 88
 #define Y_ENABLE_READ READ(Y_ENABLE_PIN)
89 89
 
90 90
 // Y2 motor
91
-#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
91
+#if HAS_Y2_ENABLE
92 92
   #define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
93 93
   #define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE)
94 94
   #define Y2_STEP_READ READ(Y2_STEP_PIN)
@@ -116,7 +116,7 @@
116 116
 #define Z_ENABLE_READ READ(Z_ENABLE_PIN)
117 117
 
118 118
 // Z2 motor
119
-#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
119
+#if HAS_Z2_ENABLE
120 120
   #define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
121 121
   #define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE)
122 122
   #define Z2_STEP_READ READ(Z2_STEP_PIN)

Loading…
Cancel
Save