Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can't use EXTRUDERS == 0 #15567

Closed
anttix opened this issue Oct 15, 2019 · 5 comments
Closed

[BUG] Can't use EXTRUDERS == 0 #15567

anttix opened this issue Oct 15, 2019 · 5 comments

Comments

@anttix
Copy link
Contributor

anttix commented Oct 15, 2019

Description

Setting EXTRUDERS = 0 (e.g. to power a CNC machine) with a combination of S_CURVE_ACCELERATION or X/Y_DUAL_STEPPER_DRIVERS will make firmware unstable and slow.

Steps to Reproduce

  1. Apply the following patch to stock config.
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 4568965..73f2fc0 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -143,7 +143,7 @@
 
 // This defines the number of extruders
 // :[1, 2, 3, 4, 5, 6]
-#define EXTRUDERS 1
+#define EXTRUDERS 0
 
 // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
@@ -796,7 +796,7 @@
  *
  * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
  */
-//#define S_CURVE_ACCELERATION
+#define S_CURVE_ACCELERATION
 
 //===========================================================================
 //============================= Z Probe Options =============================

or

apply this patch

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 4568965..2d34d58 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -143,7 +143,7 @@
 
 // This defines the number of extruders
 // :[1, 2, 3, 4, 5, 6]
-#define EXTRUDERS 1
+#define EXTRUDERS 0
 
 // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
 #define DEFAULT_NOMINAL_FILAMENT_DIA 3.0
@@ -605,8 +605,8 @@
 #define USE_XMIN_PLUG
 #define USE_YMIN_PLUG
 #define USE_ZMIN_PLUG
-//#define USE_XMAX_PLUG
-//#define USE_YMAX_PLUG
+#define USE_XMAX_PLUG
+#define USE_YMAX_PLUG
 //#define USE_ZMAX_PLUG
 
 // Enable pullup for all endstops to prevent a floating state
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 7b7ae9c..3ac7eee 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -420,20 +420,20 @@
  * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
  */
 
-//#define X_DUAL_STEPPER_DRIVERS
+#define X_DUAL_STEPPER_DRIVERS
 #if ENABLED(X_DUAL_STEPPER_DRIVERS)
   #define INVERT_X2_VS_X_DIR true   // Set 'true' if X motors should rotate in opposite directions
-  //#define X_DUAL_ENDSTOPS
+  #define X_DUAL_ENDSTOPS
   #if ENABLED(X_DUAL_ENDSTOPS)
     #define X2_USE_ENDSTOP _XMAX_
     #define X_DUAL_ENDSTOPS_ADJUSTMENT  0
   #endif
 #endif
 
-//#define Y_DUAL_STEPPER_DRIVERS
+#define Y_DUAL_STEPPER_DRIVERS
 #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
   #define INVERT_Y2_VS_Y_DIR true   // Set 'true' if Y motors should rotate in opposite directions
-  //#define Y_DUAL_ENDSTOPS
+  #define Y_DUAL_ENDSTOPS
   #if ENABLED(Y_DUAL_ENDSTOPS)
     #define Y2_USE_ENDSTOP _YMAX_
     #define Y_DUAL_ENDSTOPS_ADJUSTMENT  0
  1. Run a complex gcode file that has simultaneous xyz moves e.g. lion.gcode

Expected behavior: The gcode file completes normally with nominal time. Physics limited runtime of the above file is around 30min, on an Atmega board the file should take about 40min due to CPU not being powerful enough.

Actual behavior: The file takes over 4h to complete or never completes at all, the firmware reports being busy for extended periods of time, there are random resets on LPC1768 based boards.

Additional Information

config files extr0-configs.zip

Oddly enough enabling dual steppers without separate end-stops works fine.

Tested with three different boards:

  • Atmega 2560 with RAMPS 1.4
  • Bigtreetech SKR 1.3
  • Bigtreetech SKR Pro 1.1

There are long pauses in motion suggesting either long computation or invisible tiny moves

Alt text

@shitcreek
Copy link
Contributor

Could you clarify on this: "Oddly enough enabling dual steppers without separate end-stops works fine." ?

@anttix
Copy link
Contributor Author

anttix commented Oct 21, 2019

@shitcreek if I enabled only X/Y_DUAL_STEPPER_DRIVERS without setting X/Y_DUAL_ENDSTOPS then the planner didn't freeze. I didn't do any extensive testing in this mode.

@thinkyhead thinkyhead changed the title [BUG] EXTRUDERS == 0 makes machine unstable if some features such as S_CURVE_ACCELERATION and X/Y_DUAL_STEPPER_DRIVERS are also enabled [BUG] Can't use EXTRUDERS == 0 Oct 25, 2019
@thinkyhead
Copy link
Member

It's not yet supported to set EXTRUDERS to 0. We already have issues open on the topic, so this can be closed.

@anttix
Copy link
Contributor Author

anttix commented Nov 25, 2019

Currently open issue: #10212

@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants