Browse Source

Merge pull request #5371 from thinkyhead/rc_extruders_can_differ

Allow distinct factors for multiple extruders
Scott Lahteine 8 years ago
parent
commit
b6b100c471
29 changed files with 495 additions and 131 deletions
  1. 13
    1
      Marlin/Conditionals_LCD.h
  2. 10
    2
      Marlin/Configuration.h
  3. 38
    9
      Marlin/Marlin_main.cpp
  4. 35
    10
      Marlin/configuration_store.cpp
  5. 1
    0
      Marlin/enum.h
  6. 11
    3
      Marlin/example_configurations/Cartesio/Configuration.h
  7. 10
    2
      Marlin/example_configurations/Felix/Configuration.h
  8. 10
    2
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  9. 10
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  10. 10
    2
      Marlin/example_configurations/Hephestos_2/Configuration.h
  11. 11
    3
      Marlin/example_configurations/K8200/Configuration.h
  12. 10
    2
      Marlin/example_configurations/K8400/Configuration.h
  13. 10
    2
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  14. 11
    3
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  15. 13
    4
      Marlin/example_configurations/RigidBot/Configuration.h
  16. 11
    3
      Marlin/example_configurations/SCARA/Configuration.h
  17. 10
    2
      Marlin/example_configurations/TAZ4/Configuration.h
  18. 11
    3
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 10
    2
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  20. 13
    5
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  21. 11
    3
      Marlin/example_configurations/delta/generic/Configuration.h
  22. 11
    3
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 11
    3
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  24. 11
    3
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  25. 10
    2
      Marlin/example_configurations/makibox/Configuration.h
  26. 11
    3
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  27. 63
    35
      Marlin/planner.cpp
  28. 24
    14
      Marlin/planner.h
  29. 85
    3
      Marlin/ultralcd.cpp

+ 13
- 1
Marlin/Conditionals_LCD.h View File

286
    *  HOTENDS      - Number of hotends, whether connected or separate
286
    *  HOTENDS      - Number of hotends, whether connected or separate
287
    *  E_STEPPERS   - Number of actual E stepper motors
287
    *  E_STEPPERS   - Number of actual E stepper motors
288
    *  TOOL_E_INDEX - Index to use when getting/setting the tool state
288
    *  TOOL_E_INDEX - Index to use when getting/setting the tool state
289
-   *  
289
+   *
290
    */
290
    */
291
   #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
291
   #if ENABLED(SINGLENOZZLE)             // One hotend, multi-extruder
292
     #define HOTENDS      1
292
     #define HOTENDS      1
317
   #endif
317
   #endif
318
 
318
 
319
   /**
319
   /**
320
+   * Distinct E Factors – Disable by commenting out DISTINCT_E_FACTORS
321
+   */
322
+  #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
323
+    #define XYZE_N (XYZ + E_STEPPERS)
324
+    #define E_AXIS_N (E_AXIS + extruder)
325
+  #else
326
+    #undef DISTINCT_E_FACTORS
327
+    #define XYZE_N XYZE
328
+    #define E_AXIS_N E_AXIS
329
+  #endif
330
+
331
+  /**
320
    * The BLTouch Probe emulates a servo probe
332
    * The BLTouch Probe emulates a servo probe
321
    * and uses "special" angles for its state.
333
    * and uses "special" angles for its state.
322
    */
334
    */

+ 10
- 2
Marlin/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
489
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
496
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
497
 
505
 

+ 38
- 9
Marlin/Marlin_main.cpp View File

1227
   }
1227
   }
1228
 
1228
 
1229
   inline float axis_unit_factor(int axis) {
1229
   inline float axis_unit_factor(int axis) {
1230
-    return (axis == E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor);
1230
+    return (axis >= E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor);
1231
   }
1231
   }
1232
 
1232
 
1233
   inline float code_value_linear_units() { return code_value_float() * linear_unit_factor; }
1233
   inline float code_value_linear_units() { return code_value_float() * linear_unit_factor; }
5795
 }
5795
 }
5796
 
5796
 
5797
 /**
5797
 /**
5798
+ * Multi-stepper support for M92, M201, M203
5799
+ */
5800
+#if ENABLED(DISTINCT_E_FACTORS)
5801
+  #define GET_TARGET_EXTRUDER(CMD) if (get_target_extruder_from_command(CMD)) return
5802
+  #define TARGET_EXTRUDER target_extruder
5803
+#else
5804
+  #define GET_TARGET_EXTRUDER(CMD) NOOP
5805
+  #define TARGET_EXTRUDER 0
5806
+#endif
5807
+
5808
+/**
5798
  * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
5809
  * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E.
5799
  *      (Follows the same syntax as G92)
5810
  *      (Follows the same syntax as G92)
5811
+ *
5812
+ *      With multiple extruders use T to specify which one.
5800
  */
5813
  */
5801
 inline void gcode_M92() {
5814
 inline void gcode_M92() {
5815
+
5816
+  GET_TARGET_EXTRUDER(92);
5817
+
5802
   LOOP_XYZE(i) {
5818
   LOOP_XYZE(i) {
5803
     if (code_seen(axis_codes[i])) {
5819
     if (code_seen(axis_codes[i])) {
5804
       if (i == E_AXIS) {
5820
       if (i == E_AXIS) {
5805
-        float value = code_value_per_axis_unit(i);
5821
+        float value = code_value_per_axis_unit(E_AXIS + TARGET_EXTRUDER);
5806
         if (value < 20.0) {
5822
         if (value < 20.0) {
5807
-          float factor = planner.axis_steps_per_mm[i] / value; // increase e constants if M92 E14 is given for netfab.
5823
+          float factor = planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] / value; // increase e constants if M92 E14 is given for netfab.
5808
           planner.max_jerk[E_AXIS] *= factor;
5824
           planner.max_jerk[E_AXIS] *= factor;
5809
-          planner.max_feedrate_mm_s[E_AXIS] *= factor;
5810
-          planner.max_acceleration_steps_per_s2[E_AXIS] *= factor;
5825
+          planner.max_feedrate_mm_s[E_AXIS + TARGET_EXTRUDER] *= factor;
5826
+          planner.max_acceleration_steps_per_s2[E_AXIS + TARGET_EXTRUDER] *= factor;
5811
         }
5827
         }
5812
-        planner.axis_steps_per_mm[E_AXIS] = value;
5828
+        planner.axis_steps_per_mm[E_AXIS + TARGET_EXTRUDER] = value;
5813
       }
5829
       }
5814
       else {
5830
       else {
5815
         planner.axis_steps_per_mm[i] = code_value_per_axis_unit(i);
5831
         planner.axis_steps_per_mm[i] = code_value_per_axis_unit(i);
6060
 
6076
 
6061
 /**
6077
 /**
6062
  * M201: Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
6078
  * M201: Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
6079
+ *
6080
+ *       With multiple extruders use T to specify which one.
6063
  */
6081
  */
6064
 inline void gcode_M201() {
6082
 inline void gcode_M201() {
6083
+
6084
+  GET_TARGET_EXTRUDER(201);
6085
+
6065
   LOOP_XYZE(i) {
6086
   LOOP_XYZE(i) {
6066
     if (code_seen(axis_codes[i])) {
6087
     if (code_seen(axis_codes[i])) {
6067
-      planner.max_acceleration_mm_per_s2[i] = code_value_axis_units(i);
6088
+      const uint8_t a = i + (i == E_AXIS ? TARGET_EXTRUDER : 0);
6089
+      planner.max_acceleration_mm_per_s2[a] = code_value_axis_units(a);
6068
     }
6090
     }
6069
   }
6091
   }
6070
   // steps per sq second need to be updated to agree with the units per sq second (as they are what is used in the planner)
6092
   // steps per sq second need to be updated to agree with the units per sq second (as they are what is used in the planner)
6082
 
6104
 
6083
 /**
6105
 /**
6084
  * M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec
6106
  * M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec
6107
+ *
6108
+ *       With multiple extruders use T to specify which one.
6085
  */
6109
  */
6086
 inline void gcode_M203() {
6110
 inline void gcode_M203() {
6111
+
6112
+  GET_TARGET_EXTRUDER(203);
6113
+
6087
   LOOP_XYZE(i)
6114
   LOOP_XYZE(i)
6088
-    if (code_seen(axis_codes[i]))
6089
-      planner.max_feedrate_mm_s[i] = code_value_axis_units(i);
6115
+    if (code_seen(axis_codes[i])) {
6116
+      const uint8_t a = i + (i == E_AXIS ? TARGET_EXTRUDER : 0);
6117
+      planner.max_feedrate_mm_s[a] = code_value_axis_units(a);
6118
+    }
6090
 }
6119
 }
6091
 
6120
 
6092
 /**
6121
 /**

+ 35
- 10
Marlin/configuration_store.cpp View File

47
  *  100  Version (char x4)
47
  *  100  Version (char x4)
48
  *  104  EEPROM Checksum (uint16_t)
48
  *  104  EEPROM Checksum (uint16_t)
49
  *
49
  *
50
- *  106  M92 XYZE  planner.axis_steps_per_mm (float x4)
51
- *  122  M203 XYZE planner.max_feedrate_mm_s (float x4)
52
- *  138  M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4)
50
+ *  106  M92 XYZE  planner.axis_steps_per_mm (float x4 ... x7)
51
+ *  122  M203 XYZE planner.max_feedrate_mm_s (float x4 ... x7)
52
+ *  138  M201 XYZE planner.max_acceleration_mm_per_s2 (uint32_t x4 ... x7)
53
  *  154  M204 P    planner.acceleration (float)
53
  *  154  M204 P    planner.acceleration (float)
54
  *  158  M204 R    planner.retract_acceleration (float)
54
  *  158  M204 R    planner.retract_acceleration (float)
55
  *  162  M204 T    planner.travel_acceleration (float)
55
  *  162  M204 T    planner.travel_acceleration (float)
571
 void Config_ResetDefault() {
571
 void Config_ResetDefault() {
572
   const float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] = DEFAULT_MAX_FEEDRATE;
572
   const float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] = DEFAULT_MAX_FEEDRATE;
573
   const long tmp3[] = DEFAULT_MAX_ACCELERATION;
573
   const long tmp3[] = DEFAULT_MAX_ACCELERATION;
574
-  LOOP_XYZE(i) {
575
-    planner.axis_steps_per_mm[i] = tmp1[i];
576
-    planner.max_feedrate_mm_s[i] = tmp2[i];
577
-    planner.max_acceleration_mm_per_s2[i] = tmp3[i];
574
+  LOOP_XYZE_N(i) {
575
+    planner.axis_steps_per_mm[i]          = tmp1[i < COUNT(tmp1) ? i : COUNT(tmp1) - 1];
576
+    planner.max_feedrate_mm_s[i]          = tmp2[i < COUNT(tmp2) ? i : COUNT(tmp2) - 1];
577
+    planner.max_acceleration_mm_per_s2[i] = tmp3[i < COUNT(tmp3) ? i : COUNT(tmp3) - 1];
578
   }
578
   }
579
 
579
 
580
   planner.acceleration = DEFAULT_ACCELERATION;
580
   planner.acceleration = DEFAULT_ACCELERATION;
719
     SERIAL_ECHOPAIR("  M92 X", planner.axis_steps_per_mm[X_AXIS]);
719
     SERIAL_ECHOPAIR("  M92 X", planner.axis_steps_per_mm[X_AXIS]);
720
     SERIAL_ECHOPAIR(" Y", planner.axis_steps_per_mm[Y_AXIS]);
720
     SERIAL_ECHOPAIR(" Y", planner.axis_steps_per_mm[Y_AXIS]);
721
     SERIAL_ECHOPAIR(" Z", planner.axis_steps_per_mm[Z_AXIS]);
721
     SERIAL_ECHOPAIR(" Z", planner.axis_steps_per_mm[Z_AXIS]);
722
-    SERIAL_ECHOPAIR(" E", planner.axis_steps_per_mm[E_AXIS]);
722
+    #if E_STEPPERS == 1
723
+      SERIAL_ECHOPAIR(" E", planner.axis_steps_per_mm[E_AXIS]);
724
+    #endif
723
     SERIAL_EOL;
725
     SERIAL_EOL;
726
+    #if ENABLED(DISTINCT_E_FACTORS)
727
+      for (uint8_t i = 0; i < E_STEPPERS; i++) {
728
+        SERIAL_ECHOPAIR("  M92 T", (int)i);
729
+        SERIAL_ECHOLNPAIR(" E", planner.axis_steps_per_mm[E_AXIS + i]);
730
+      }
731
+    #endif
724
 
732
 
725
     CONFIG_ECHO_START;
733
     CONFIG_ECHO_START;
726
 
734
 
731
     SERIAL_ECHOPAIR("  M203 X", planner.max_feedrate_mm_s[X_AXIS]);
739
     SERIAL_ECHOPAIR("  M203 X", planner.max_feedrate_mm_s[X_AXIS]);
732
     SERIAL_ECHOPAIR(" Y", planner.max_feedrate_mm_s[Y_AXIS]);
740
     SERIAL_ECHOPAIR(" Y", planner.max_feedrate_mm_s[Y_AXIS]);
733
     SERIAL_ECHOPAIR(" Z", planner.max_feedrate_mm_s[Z_AXIS]);
741
     SERIAL_ECHOPAIR(" Z", planner.max_feedrate_mm_s[Z_AXIS]);
734
-    SERIAL_ECHOPAIR(" E", planner.max_feedrate_mm_s[E_AXIS]);
742
+    #if E_STEPPERS == 1
743
+      SERIAL_ECHOPAIR(" E", planner.max_feedrate_mm_s[E_AXIS]);
744
+    #endif
735
     SERIAL_EOL;
745
     SERIAL_EOL;
746
+    #if ENABLED(DISTINCT_E_FACTORS)
747
+      for (uint8_t i = 0; i < E_STEPPERS; i++) {
748
+        SERIAL_ECHOPAIR("  M203 T", (int)i);
749
+        SERIAL_ECHOLNPAIR(" E", planner.max_feedrate_mm_s[E_AXIS + i]);
750
+      }
751
+    #endif
736
 
752
 
737
     CONFIG_ECHO_START;
753
     CONFIG_ECHO_START;
738
     if (!forReplay) {
754
     if (!forReplay) {
742
     SERIAL_ECHOPAIR("  M201 X", planner.max_acceleration_mm_per_s2[X_AXIS]);
758
     SERIAL_ECHOPAIR("  M201 X", planner.max_acceleration_mm_per_s2[X_AXIS]);
743
     SERIAL_ECHOPAIR(" Y", planner.max_acceleration_mm_per_s2[Y_AXIS]);
759
     SERIAL_ECHOPAIR(" Y", planner.max_acceleration_mm_per_s2[Y_AXIS]);
744
     SERIAL_ECHOPAIR(" Z", planner.max_acceleration_mm_per_s2[Z_AXIS]);
760
     SERIAL_ECHOPAIR(" Z", planner.max_acceleration_mm_per_s2[Z_AXIS]);
745
-    SERIAL_ECHOPAIR(" E", planner.max_acceleration_mm_per_s2[E_AXIS]);
761
+    #if E_STEPPERS == 1
762
+      SERIAL_ECHOPAIR(" E", planner.max_acceleration_mm_per_s2[E_AXIS]);
763
+    #endif
746
     SERIAL_EOL;
764
     SERIAL_EOL;
765
+    #if ENABLED(DISTINCT_E_FACTORS)
766
+      for (uint8_t i = 0; i < E_STEPPERS; i++) {
767
+        SERIAL_ECHOPAIR("  M201 T", (int)i);
768
+        SERIAL_ECHOLNPAIR(" E", planner.max_acceleration_mm_per_s2[E_AXIS + i]);
769
+      }
770
+    #endif
771
+
747
     CONFIG_ECHO_START;
772
     CONFIG_ECHO_START;
748
     if (!forReplay) {
773
     if (!forReplay) {
749
       SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");
774
       SERIAL_ECHOLNPGM("Accelerations: P=printing, R=retract and T=travel");

+ 1
- 0
Marlin/enum.h View File

50
 
50
 
51
 #define LOOP_XYZ(VAR)  for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
51
 #define LOOP_XYZ(VAR)  for (uint8_t VAR=X_AXIS; VAR<=Z_AXIS; VAR++)
52
 #define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
52
 #define LOOP_XYZE(VAR) for (uint8_t VAR=X_AXIS; VAR<=E_AXIS; VAR++)
53
+#define LOOP_XYZE_N(VAR) for (uint8_t VAR=X_AXIS; VAR<XYZE_N; VAR++)
53
 
54
 
54
 typedef enum {
55
 typedef enum {
55
   LINEARUNIT_MM,
56
   LINEARUNIT_MM,

+ 11
- 3
Marlin/example_configurations/Cartesio/Configuration.h View File

146
 // :[1, 2, 3, 4]
146
 // :[1, 2, 3, 4]
147
 #define EXTRUDERS 3
147
 #define EXTRUDERS 3
148
 
148
 
149
+// Enable if your E steppers or extruder gear ratios are not identical
150
+//#define DISTINCT_E_FACTORS
151
+
149
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
152
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
150
 //#define SINGLENOZZLE
153
 //#define SINGLENOZZLE
151
 
154
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.128, 71.128, 640, 152 }
489
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.128, 71.128, 640, 152 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
-#define DEFAULT_MAX_FEEDRATE          { 200, 200, 20, 20 }   // (mm/sec)
496
+#define DEFAULT_MAX_FEEDRATE          { 200, 200, 20, 20 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 100, 10000 }
497
 
505
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
455
  *
458
  *
456
  * These settings can be reset by M502
459
  * These settings can be reset by M502
457
  *
460
  *
461
+ * You can set distinct factors for each E stepper, if needed.
462
+ * If fewer factors are given, the last will apply to the rest.
463
+ *
458
  * Note that if EEPROM is enabled, saved values will override these.
464
  * Note that if EEPROM is enabled, saved values will override these.
459
  */
465
  */
460
 
466
 
461
 /**
467
 /**
462
  * Default Axis Steps Per Unit (steps/mm)
468
  * Default Axis Steps Per Unit (steps/mm)
463
  * Override with M92
469
  * Override with M92
470
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
464
  */
471
  */
465
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 76.190476, 76.190476, 1600, 164 }
472
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 76.190476, 76.190476, 1600, 164 }
466
 
473
 
467
 /**
474
 /**
468
  * Default Max Feed Rate (mm/s)
475
  * Default Max Feed Rate (mm/s)
469
  * Override with M203
476
  * Override with M203
477
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
470
  */
478
  */
471
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
479
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
472
 
480
 
473
 /**
481
 /**
474
  * Default Max Acceleration (change/s) change = mm/s
482
  * Default Max Acceleration (change/s) change = mm/s
483
+ * (Maximum start speed for accelerated moves)
475
  * Override with M201
484
  * Override with M201
476
- *
477
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
485
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
478
  */
486
  */
479
 #define DEFAULT_MAX_ACCELERATION      { 5000, 5000, 100, 80000 }
487
 #define DEFAULT_MAX_ACCELERATION      { 5000, 5000, 100, 80000 }
480
 
488
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 2
146
 #define EXTRUDERS 2
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
455
  *
458
  *
456
  * These settings can be reset by M502
459
  * These settings can be reset by M502
457
  *
460
  *
461
+ * You can set distinct factors for each E stepper, if needed.
462
+ * If fewer factors are given, the last will apply to the rest.
463
+ *
458
  * Note that if EEPROM is enabled, saved values will override these.
464
  * Note that if EEPROM is enabled, saved values will override these.
459
  */
465
  */
460
 
466
 
461
 /**
467
 /**
462
  * Default Axis Steps Per Unit (steps/mm)
468
  * Default Axis Steps Per Unit (steps/mm)
463
  * Override with M92
469
  * Override with M92
470
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
464
  */
471
  */
465
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 76.190476, 76.190476, 1600, 164 }
472
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 76.190476, 76.190476, 1600, 164 }
466
 
473
 
467
 /**
474
 /**
468
  * Default Max Feed Rate (mm/s)
475
  * Default Max Feed Rate (mm/s)
469
  * Override with M203
476
  * Override with M203
477
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
470
  */
478
  */
471
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
479
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
472
 
480
 
473
 /**
481
 /**
474
  * Default Max Acceleration (change/s) change = mm/s
482
  * Default Max Acceleration (change/s) change = mm/s
483
+ * (Maximum start speed for accelerated moves)
475
  * Override with M201
484
  * Override with M201
476
- *
477
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
485
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
478
  */
486
  */
479
 #define DEFAULT_MAX_ACCELERATION      { 5000, 5000, 100, 80000 }
487
 #define DEFAULT_MAX_ACCELERATION      { 5000, 5000, 100, 80000 }
480
 
488
 

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

148
 // :[1, 2, 3, 4]
148
 // :[1, 2, 3, 4]
149
 #define EXTRUDERS 1
149
 #define EXTRUDERS 1
150
 
150
 
151
+// Enable if your E steppers or extruder gear ratios are not identical
152
+//#define DISTINCT_E_FACTORS
153
+
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
154
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
152
 //#define SINGLENOZZLE
155
 //#define SINGLENOZZLE
153
 
156
 
464
  *
467
  *
465
  * These settings can be reset by M502
468
  * These settings can be reset by M502
466
  *
469
  *
470
+ * You can set distinct factors for each E stepper, if needed.
471
+ * If fewer factors are given, the last will apply to the rest.
472
+ *
467
  * Note that if EEPROM is enabled, saved values will override these.
473
  * Note that if EEPROM is enabled, saved values will override these.
468
  */
474
  */
469
 
475
 
470
 /**
476
 /**
471
  * Default Axis Steps Per Unit (steps/mm)
477
  * Default Axis Steps Per Unit (steps/mm)
472
  * Override with M92
478
  * Override with M92
479
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
473
  */
480
  */
474
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 100.47095761381482 }
481
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 100.47095761381482 }
475
 
482
 
476
 /**
483
 /**
477
  * Default Max Feed Rate (mm/s)
484
  * Default Max Feed Rate (mm/s)
478
  * Override with M203
485
  * Override with M203
486
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
479
  */
487
  */
480
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 3.3, 25 }
488
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 3.3, 25 }
481
 
489
 
482
 /**
490
 /**
483
  * Default Max Acceleration (change/s) change = mm/s
491
  * Default Max Acceleration (change/s) change = mm/s
492
+ * (Maximum start speed for accelerated moves)
484
  * Override with M201
493
  * Override with M201
485
- *
486
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_ACCELERATION      { 1100, 1100, 100, 10000 }
496
 #define DEFAULT_MAX_ACCELERATION      { 1100, 1100, 100, 10000 }
489
 
497
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
466
  *
469
  *
467
  * These settings can be reset by M502
470
  * These settings can be reset by M502
468
  *
471
  *
472
+ * You can set distinct factors for each E stepper, if needed.
473
+ * If fewer factors are given, the last will apply to the rest.
474
+ *
469
  * Note that if EEPROM is enabled, saved values will override these.
475
  * Note that if EEPROM is enabled, saved values will override these.
470
  */
476
  */
471
 
477
 
472
 /**
478
 /**
473
  * Default Axis Steps Per Unit (steps/mm)
479
  * Default Axis Steps Per Unit (steps/mm)
474
  * Override with M92
480
  * Override with M92
481
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
475
  */
482
  */
476
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 160, 160, 8000, 210.02 }
483
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 160, 160, 8000, 210.02 }
477
 
484
 
478
 /**
485
 /**
479
  * Default Max Feed Rate (mm/s)
486
  * Default Max Feed Rate (mm/s)
480
  * Override with M203
487
  * Override with M203
488
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
489
  */
482
 #define DEFAULT_MAX_FEEDRATE          { 250, 250, 2, 200 }
490
 #define DEFAULT_MAX_FEEDRATE          { 250, 250, 2, 200 }
483
 
491
 
484
 /**
492
 /**
485
  * Default Max Acceleration (change/s) change = mm/s
493
  * Default Max Acceleration (change/s) change = mm/s
494
+ * (Maximum start speed for accelerated moves)
486
  * Override with M201
495
  * Override with M201
487
- *
488
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
496
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
489
  */
497
  */
490
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 20, 1000 }
498
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 20, 1000 }
491
 
499
 

+ 11
- 3
Marlin/example_configurations/K8200/Configuration.h View File

165
 // :[1, 2, 3, 4]
165
 // :[1, 2, 3, 4]
166
 #define EXTRUDERS 1
166
 #define EXTRUDERS 1
167
 
167
 
168
+// Enable if your E steppers or extruder gear ratios are not identical
169
+//#define DISTINCT_E_FACTORS
170
+
168
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
171
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
169
 //#define SINGLENOZZLE
172
 //#define SINGLENOZZLE
170
 
173
 
502
  *
505
  *
503
  * These settings can be reset by M502
506
  * These settings can be reset by M502
504
  *
507
  *
508
+ * You can set distinct factors for each E stepper, if needed.
509
+ * If fewer factors are given, the last will apply to the rest.
510
+ *
505
  * Note that if EEPROM is enabled, saved values will override these.
511
  * Note that if EEPROM is enabled, saved values will override these.
506
  */
512
  */
507
 
513
 
508
 /**
514
 /**
509
  * Default Axis Steps Per Unit (steps/mm)
515
  * Default Axis Steps Per Unit (steps/mm)
510
  * Override with M92
516
  * Override with M92
517
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
511
  */
518
  */
512
-#define DEFAULT_AXIS_STEPS_PER_UNIT   { 64.25, 64.25, 2560, 600}  // for K8200
519
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 64.25, 64.25, 2560, 600 }
513
 /**
520
 /**
514
  * Default Max Feed Rate (mm/s)
521
  * Default Max Feed Rate (mm/s)
515
  * Override with M203
522
  * Override with M203
523
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
516
  */
524
  */
517
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
525
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
518
 
526
 
519
 /**
527
 /**
520
  * Default Max Acceleration (change/s) change = mm/s
528
  * Default Max Acceleration (change/s) change = mm/s
529
+ * (Maximum start speed for accelerated moves)
521
  * Override with M201
530
  * Override with M201
522
- *
523
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
531
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
524
  */
532
  */
525
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
533
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
526
 
534
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 134.74, 134.74, 4266.66, 148.7 }
489
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 134.74, 134.74, 4266.66, 148.7 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_FEEDRATE          { 160, 160, 10, 10000 }
496
 #define DEFAULT_MAX_FEEDRATE          { 160, 160, 10, 10000 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
497
 
505
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 2
146
 #define EXTRUDERS 2
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 134.74, 134.74, 4266.66, 148.7 }
489
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 134.74, 134.74, 4266.66, 148.7 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_FEEDRATE          { 160, 160, 10, 10000 }
496
 #define DEFAULT_MAX_FEEDRATE          { 160, 160, 10, 10000 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
497
 
505
 

+ 11
- 3
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402*2,78.7402*2,5120.00,760*1*1.5}
489
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 78.7402*2, 78.7402*2, 5120.00, 760*1*1.5 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
496
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
497
 
505
 

+ 13
- 4
Marlin/example_configurations/RigidBot/Configuration.h View File

148
 // :[1, 2, 3, 4]
148
 // :[1, 2, 3, 4]
149
 #define EXTRUDERS 1  // Single extruder. Set to 2 for dual extruders
149
 #define EXTRUDERS 1  // Single extruder. Set to 2 for dual extruders
150
 
150
 
151
+// Enable if your E steppers or extruder gear ratios are not identical
152
+//#define DISTINCT_E_FACTORS
153
+
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
154
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
152
 //#define SINGLENOZZLE
155
 //#define SINGLENOZZLE
153
 
156
 
469
  *
472
  *
470
  * These settings can be reset by M502
473
  * These settings can be reset by M502
471
  *
474
  *
475
+ * You can set distinct factors for each E stepper, if needed.
476
+ * If fewer factors are given, the last will apply to the rest.
477
+ *
472
  * Note that if EEPROM is enabled, saved values will override these.
478
  * Note that if EEPROM is enabled, saved values will override these.
473
  */
479
  */
474
 
480
 
475
 /**
481
 /**
476
  * Default Axis Steps Per Unit (steps/mm)
482
  * Default Axis Steps Per Unit (steps/mm)
477
  * Override with M92
483
  * Override with M92
484
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
478
  */
485
  */
479
-#define DEFAULT_AXIS_STEPS_PER_UNIT   { 44.3090, 22.1545, 1600, 53.5 }  // default steps per unit for RigidBot with standard hardware
480
-                                                                        // default steps for 16-tooth pulleys { 100.06, 50.06, 1600, 76 }, HPX2-MAX E=504, RigidBot E=53.5, Peter Stoneham's=76
486
+ // default steps per unit for RigidBot with standard hardware
487
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 44.3090, 22.1545, 1600, 53.5 }
488
+// default steps for 16-tooth pulleys { 100.06, 50.06, 1600, 76 } // HPX2-MAX E=504, RigidBot E=53.5, Peter Stoneham's=76
481
 
489
 
482
 /**
490
 /**
483
  * Default Max Feed Rate (mm/s)
491
  * Default Max Feed Rate (mm/s)
484
  * Override with M203
492
  * Override with M203
493
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
485
  */
494
  */
486
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
495
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 25 }
487
 
496
 
488
 /**
497
 /**
489
  * Default Max Acceleration (change/s) change = mm/s
498
  * Default Max Acceleration (change/s) change = mm/s
499
+ * (Maximum start speed for accelerated moves)
490
  * Override with M201
500
  * Override with M201
491
- *
492
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
501
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
493
  */
502
  */
494
 #define DEFAULT_MAX_ACCELERATION      { 800, 800, 100, 10000 }
503
 #define DEFAULT_MAX_ACCELERATION      { 800, 800, 100, 10000 }
495
 
504
 

+ 11
- 3
Marlin/example_configurations/SCARA/Configuration.h View File

177
 // :[1, 2, 3, 4]
177
 // :[1, 2, 3, 4]
178
 #define EXTRUDERS 1
178
 #define EXTRUDERS 1
179
 
179
 
180
+// Enable if your E steppers or extruder gear ratios are not identical
181
+//#define DISTINCT_E_FACTORS
182
+
180
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
183
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
181
 //#define SINGLENOZZLE
184
 //#define SINGLENOZZLE
182
 
185
 
487
  *
490
  *
488
  * These settings can be reset by M502
491
  * These settings can be reset by M502
489
  *
492
  *
493
+ * You can set distinct factors for each E stepper, if needed.
494
+ * If fewer factors are given, the last will apply to the rest.
495
+ *
490
  * Note that if EEPROM is enabled, saved values will override these.
496
  * Note that if EEPROM is enabled, saved values will override these.
491
  */
497
  */
492
 
498
 
493
 /**
499
 /**
494
  * Default Axis Steps Per Unit (steps/mm)
500
  * Default Axis Steps Per Unit (steps/mm)
495
  * Override with M92
501
  * Override with M92
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
496
  */
503
  */
497
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {103.69,106.65,200/1.25,1000}  // default steps per unit for SCARA
504
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 103.69, 106.65, 200/1.25, 1000 }  // default steps per unit for SCARA
498
 
505
 
499
 /**
506
 /**
500
  * Default Max Feed Rate (mm/s)
507
  * Default Max Feed Rate (mm/s)
501
  * Override with M203
508
  * Override with M203
509
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
502
  */
510
  */
503
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 30, 25 }
511
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 30, 25 }
504
 
512
 
505
 /**
513
 /**
506
  * Default Max Acceleration (change/s) change = mm/s
514
  * Default Max Acceleration (change/s) change = mm/s
515
+ * (Maximum start speed for accelerated moves)
507
  * Override with M201
516
  * Override with M201
508
- *
509
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
517
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
510
  */
518
  */
511
 #define DEFAULT_MAX_ACCELERATION      { 300, 300, 20, 1000 }
519
 #define DEFAULT_MAX_ACCELERATION      { 300, 300, 20, 1000 }
512
 
520
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
493
  *
496
  *
494
  * These settings can be reset by M502
497
  * These settings can be reset by M502
495
  *
498
  *
499
+ * You can set distinct factors for each E stepper, if needed.
500
+ * If fewer factors are given, the last will apply to the rest.
501
+ *
496
  * Note that if EEPROM is enabled, saved values will override these.
502
  * Note that if EEPROM is enabled, saved values will override these.
497
  */
503
  */
498
 
504
 
499
 /**
505
 /**
500
  * Default Axis Steps Per Unit (steps/mm)
506
  * Default Axis Steps Per Unit (steps/mm)
501
  * Override with M92
507
  * Override with M92
508
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
502
  */
509
  */
503
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 100.5, 100.5, 400, 850 }
510
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 100.5, 100.5, 400, 850 }
504
 
511
 
505
 /**
512
 /**
506
  * Default Max Feed Rate (mm/s)
513
  * Default Max Feed Rate (mm/s)
507
  * Override with M203
514
  * Override with M203
515
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
508
  */
516
  */
509
 #define DEFAULT_MAX_FEEDRATE          { 800, 800, 8, 50 }
517
 #define DEFAULT_MAX_FEEDRATE          { 800, 800, 8, 50 }
510
 
518
 
511
 /**
519
 /**
512
  * Default Max Acceleration (change/s) change = mm/s
520
  * Default Max Acceleration (change/s) change = mm/s
521
+ * (Maximum start speed for accelerated moves)
513
  * Override with M201
522
  * Override with M201
514
- *
515
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
523
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
516
  */
524
  */
517
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
525
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
518
 
526
 

+ 11
- 3
Marlin/example_configurations/WITBOX/Configuration.h View File

148
 // :[1, 2, 3, 4]
148
 // :[1, 2, 3, 4]
149
 #define EXTRUDERS 1
149
 #define EXTRUDERS 1
150
 
150
 
151
+// Enable if your E steppers or extruder gear ratios are not identical
152
+//#define DISTINCT_E_FACTORS
153
+
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
154
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
152
 //#define SINGLENOZZLE
155
 //#define SINGLENOZZLE
153
 
156
 
464
  *
467
  *
465
  * These settings can be reset by M502
468
  * These settings can be reset by M502
466
  *
469
  *
470
+ * You can set distinct factors for each E stepper, if needed.
471
+ * If fewer factors are given, the last will apply to the rest.
472
+ *
467
  * Note that if EEPROM is enabled, saved values will override these.
473
  * Note that if EEPROM is enabled, saved values will override these.
468
  */
474
  */
469
 
475
 
470
 /**
476
 /**
471
  * Default Axis Steps Per Unit (steps/mm)
477
  * Default Axis Steps Per Unit (steps/mm)
472
  * Override with M92
478
  * Override with M92
479
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
473
  */
480
  */
474
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,600.0*8/3,102.073}
481
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 600.0*8/3, 102.073 }
475
 
482
 
476
 /**
483
 /**
477
  * Default Max Feed Rate (mm/s)
484
  * Default Max Feed Rate (mm/s)
478
  * Override with M203
485
  * Override with M203
486
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
479
  */
487
  */
480
 #define DEFAULT_MAX_FEEDRATE          { 350, 350, 7.2, 80 }
488
 #define DEFAULT_MAX_FEEDRATE          { 350, 350, 7.2, 80 }
481
 
489
 
482
 /**
490
 /**
483
  * Default Max Acceleration (change/s) change = mm/s
491
  * Default Max Acceleration (change/s) change = mm/s
492
+ * (Maximum start speed for accelerated moves)
484
  * Override with M201
493
  * Override with M201
485
- *
486
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 10, 1000 }
496
 #define DEFAULT_MAX_ACCELERATION      { 1000, 1000, 10, 1000 }
489
 
497
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
472
  *
475
  *
473
  * These settings can be reset by M502
476
  * These settings can be reset by M502
474
  *
477
  *
478
+ * You can set distinct factors for each E stepper, if needed.
479
+ * If fewer factors are given, the last will apply to the rest.
480
+ *
475
  * Note that if EEPROM is enabled, saved values will override these.
481
  * Note that if EEPROM is enabled, saved values will override these.
476
  */
482
  */
477
 
483
 
478
 /**
484
 /**
479
  * Default Axis Steps Per Unit (steps/mm)
485
  * Default Axis Steps Per Unit (steps/mm)
480
  * Override with M92
486
  * Override with M92
487
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
488
  */
482
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
489
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
483
 
490
 
484
 /**
491
 /**
485
  * Default Max Feed Rate (mm/s)
492
  * Default Max Feed Rate (mm/s)
486
  * Override with M203
493
  * Override with M203
494
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
487
  */
495
  */
488
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
496
 #define DEFAULT_MAX_FEEDRATE          { 300, 300, 5, 25 }
489
 
497
 
490
 /**
498
 /**
491
  * Default Max Acceleration (change/s) change = mm/s
499
  * Default Max Acceleration (change/s) change = mm/s
500
+ * (Maximum start speed for accelerated moves)
492
  * Override with M201
501
  * Override with M201
493
- *
494
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
502
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
495
  */
503
  */
496
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
504
 #define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 }
497
 
505
 

+ 13
- 5
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 2
146
 #define EXTRUDERS 2
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
203
 
206
 
204
 /**
207
 /**
205
  * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
208
  * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
206
- * 
209
+ *
207
  * Temperature sensors available:
210
  * Temperature sensors available:
208
  *
211
  *
209
  *    -3 : thermocouple with MAX31855 (only for sensor 0)
212
  *    -3 : thermocouple with MAX31855 (only for sensor 0)
228
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
231
  *    60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
229
  *    66 : 4.7M High Temperature thermistor from Dyze Design
232
  *    66 : 4.7M High Temperature thermistor from Dyze Design
230
  *    70 : the 100K thermistor found in the bq Hephestos 2
233
  *    70 : the 100K thermistor found in the bq Hephestos 2
231
- * 
234
+ *
232
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
235
  *       1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
233
  *                              (but gives greater accuracy and more stable PID)
236
  *                              (but gives greater accuracy and more stable PID)
234
  *    51 : 100k thermistor - EPCOS (1k pullup)
237
  *    51 : 100k thermistor - EPCOS (1k pullup)
235
  *    52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
238
  *    52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
236
  *    55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
239
  *    55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
237
- * 
240
+ *
238
  *  1047 : Pt1000 with 4k7 pullup
241
  *  1047 : Pt1000 with 4k7 pullup
239
  *  1010 : Pt1000 with 1k pullup (non standard)
242
  *  1010 : Pt1000 with 1k pullup (non standard)
240
  *   147 : Pt100 with 4k7 pullup
243
  *   147 : Pt100 with 4k7 pullup
520
  *
523
  *
521
  * These settings can be reset by M502
524
  * These settings can be reset by M502
522
  *
525
  *
526
+ * You can set distinct factors for each E stepper, if needed.
527
+ * If fewer factors are given, the last will apply to the rest.
528
+ *
523
  * Note that if EEPROM is enabled, saved values will override these.
529
  * Note that if EEPROM is enabled, saved values will override these.
524
  */
530
  */
525
 
531
 
526
 /**
532
 /**
527
  * Default Axis Steps Per Unit (steps/mm)
533
  * Default Axis Steps Per Unit (steps/mm)
528
  * Override with M92
534
  * Override with M92
535
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
529
  */
536
  */
530
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 72.9, 72.9, 72.9, 291 }  // default steps per unit for BI v2.5 (cable drive)
537
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 72.9, 72.9, 72.9, 291 }  // default steps per unit for BI v2.5 (cable drive)
531
 
538
 
532
 /**
539
 /**
533
  * Default Max Feed Rate (mm/s)
540
  * Default Max Feed Rate (mm/s)
534
  * Override with M203
541
  * Override with M203
542
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
535
  */
543
  */
536
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 150 }
544
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 150 }
537
 
545
 
538
 /**
546
 /**
539
  * Default Max Acceleration (change/s) change = mm/s
547
  * Default Max Acceleration (change/s) change = mm/s
548
+ * (Maximum start speed for accelerated moves)
540
  * Override with M201
549
  * Override with M201
541
- *
542
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
550
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
543
  */
551
  */
544
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
552
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
545
 
553
 

+ 11
- 3
Marlin/example_configurations/delta/generic/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
520
  *
523
  *
521
  * These settings can be reset by M502
524
  * These settings can be reset by M502
522
  *
525
  *
526
+ * You can set distinct factors for each E stepper, if needed.
527
+ * If fewer factors are given, the last will apply to the rest.
528
+ *
523
  * Note that if EEPROM is enabled, saved values will override these.
529
  * Note that if EEPROM is enabled, saved values will override these.
524
  */
530
  */
525
 
531
 
526
 /**
532
 /**
527
  * Default Axis Steps Per Unit (steps/mm)
533
  * Default Axis Steps Per Unit (steps/mm)
528
  * Override with M92
534
  * Override with M92
535
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
529
  */
536
  */
530
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {80, 80, 80, 760*1.1}  // default steps per unit for Kossel (GT2, 20 tooth)
537
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 80, 760*1.1 }  // default steps per unit for Kossel (GT2, 20 tooth)
531
 
538
 
532
 /**
539
 /**
533
  * Default Max Feed Rate (mm/s)
540
  * Default Max Feed Rate (mm/s)
534
  * Override with M203
541
  * Override with M203
542
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
535
  */
543
  */
536
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 25 }
544
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 25 }
537
 
545
 
538
 /**
546
 /**
539
  * Default Max Acceleration (change/s) change = mm/s
547
  * Default Max Acceleration (change/s) change = mm/s
548
+ * (Maximum start speed for accelerated moves)
540
  * Override with M201
549
  * Override with M201
541
- *
542
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
550
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
543
  */
551
  */
544
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
552
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
545
 
553
 

+ 11
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
520
  *
523
  *
521
  * These settings can be reset by M502
524
  * These settings can be reset by M502
522
  *
525
  *
526
+ * You can set distinct factors for each E stepper, if needed.
527
+ * If fewer factors are given, the last will apply to the rest.
528
+ *
523
  * Note that if EEPROM is enabled, saved values will override these.
529
  * Note that if EEPROM is enabled, saved values will override these.
524
  */
530
  */
525
 
531
 
526
 /**
532
 /**
527
  * Default Axis Steps Per Unit (steps/mm)
533
  * Default Axis Steps Per Unit (steps/mm)
528
  * Override with M92
534
  * Override with M92
535
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
529
  */
536
  */
530
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {80, 80, 80, 760*1.1}  // default steps per unit for Kossel (GT2, 20 tooth)
537
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 80, 760*1.1 }  // default steps per unit for Kossel (GT2, 20 tooth)
531
 
538
 
532
 /**
539
 /**
533
  * Default Max Feed Rate (mm/s)
540
  * Default Max Feed Rate (mm/s)
534
  * Override with M203
541
  * Override with M203
542
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
535
  */
543
  */
536
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 25 }
544
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 500, 25 }
537
 
545
 
538
 /**
546
 /**
539
  * Default Max Acceleration (change/s) change = mm/s
547
  * Default Max Acceleration (change/s) change = mm/s
548
+ * (Maximum start speed for accelerated moves)
540
  * Override with M201
549
  * Override with M201
541
- *
542
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
550
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
543
  */
551
  */
544
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
552
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
545
 
553
 

+ 11
- 3
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

149
 // :[1, 2, 3, 4]
149
 // :[1, 2, 3, 4]
150
 #define EXTRUDERS 1
150
 #define EXTRUDERS 1
151
 
151
 
152
+// Enable if your E steppers or extruder gear ratios are not identical
153
+//#define DISTINCT_E_FACTORS
154
+
152
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
155
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
153
 //#define SINGLENOZZLE
156
 //#define SINGLENOZZLE
154
 
157
 
514
  *
517
  *
515
  * These settings can be reset by M502
518
  * These settings can be reset by M502
516
  *
519
  *
520
+ * You can set distinct factors for each E stepper, if needed.
521
+ * If fewer factors are given, the last will apply to the rest.
522
+ *
517
  * Note that if EEPROM is enabled, saved values will override these.
523
  * Note that if EEPROM is enabled, saved values will override these.
518
  */
524
  */
519
 
525
 
520
 /**
526
 /**
521
  * Default Axis Steps Per Unit (steps/mm)
527
  * Default Axis Steps Per Unit (steps/mm)
522
  * Override with M92
528
  * Override with M92
529
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
523
  */
530
  */
524
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8}
531
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8 }
525
 
532
 
526
 /**
533
 /**
527
  * Default Max Feed Rate (mm/s)
534
  * Default Max Feed Rate (mm/s)
528
  * Override with M203
535
  * Override with M203
536
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
529
  */
537
  */
530
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 200, 200 }
538
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 200, 200 }
531
 
539
 
532
 /**
540
 /**
533
  * Default Max Acceleration (change/s) change = mm/s
541
  * Default Max Acceleration (change/s) change = mm/s
542
+ * (Maximum start speed for accelerated moves)
534
  * Override with M201
543
  * Override with M201
535
- *
536
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
544
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
537
  */
545
  */
538
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 9000 }
546
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 9000 }
539
 
547
 

+ 11
- 3
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

138
 // :[1, 2, 3, 4]
138
 // :[1, 2, 3, 4]
139
 #define EXTRUDERS 1
139
 #define EXTRUDERS 1
140
 
140
 
141
+// Enable if your E steppers or extruder gear ratios are not identical
142
+//#define DISTINCT_E_FACTORS
143
+
141
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
144
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
142
 //#define SINGLENOZZLE
145
 //#define SINGLENOZZLE
143
 
146
 
526
  *
529
  *
527
  * These settings can be reset by M502
530
  * These settings can be reset by M502
528
  *
531
  *
532
+ * You can set distinct factors for each E stepper, if needed.
533
+ * If fewer factors are given, the last will apply to the rest.
534
+ *
529
  * Note that if EEPROM is enabled, saved values will override these.
535
  * Note that if EEPROM is enabled, saved values will override these.
530
  */
536
  */
531
 
537
 
532
 /**
538
 /**
533
  * Default Axis Steps Per Unit (steps/mm)
539
  * Default Axis Steps Per Unit (steps/mm)
534
  * Override with M92
540
  * Override with M92
541
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
535
  */
542
  */
536
-#define DEFAULT_AXIS_STEPS_PER_UNIT   {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158}   // default steps per unit for PowerWasp
543
+#define DEFAULT_AXIS_STEPS_PER_UNIT   { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158 }   // default steps per unit for PowerWasp
537
 
544
 
538
 /**
545
 /**
539
  * Default Max Feed Rate (mm/s)
546
  * Default Max Feed Rate (mm/s)
540
  * Override with M203
547
  * Override with M203
548
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
541
  */
549
  */
542
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 200, 25 }
550
 #define DEFAULT_MAX_FEEDRATE          { 200, 200, 200, 25 }
543
 
551
 
544
 /**
552
 /**
545
  * Default Max Acceleration (change/s) change = mm/s
553
  * Default Max Acceleration (change/s) change = mm/s
554
+ * (Maximum start speed for accelerated moves)
546
  * Override with M201
555
  * Override with M201
547
- *
548
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
556
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
549
  */
557
  */
550
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
558
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 9000, 10000 }
551
 
559
 

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

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
475
  *
478
  *
476
  * These settings can be reset by M502
479
  * These settings can be reset by M502
477
  *
480
  *
481
+ * You can set distinct factors for each E stepper, if needed.
482
+ * If fewer factors are given, the last will apply to the rest.
483
+ *
478
  * Note that if EEPROM is enabled, saved values will override these.
484
  * Note that if EEPROM is enabled, saved values will override these.
479
  */
485
  */
480
 
486
 
481
 /**
487
 /**
482
  * Default Axis Steps Per Unit (steps/mm)
488
  * Default Axis Steps Per Unit (steps/mm)
483
  * Override with M92
489
  * Override with M92
490
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
484
  */
491
  */
485
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 400, 400, 400, 163 }     // default steps per unit for ***** MakiBox A6 *****
492
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 400, 400, 400, 163 }     // default steps per unit for ***** MakiBox A6 *****
486
 
493
 
487
 /**
494
 /**
488
  * Default Max Feed Rate (mm/s)
495
  * Default Max Feed Rate (mm/s)
489
  * Override with M203
496
  * Override with M203
497
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
490
  */
498
  */
491
 #define DEFAULT_MAX_FEEDRATE          { 60, 60, 20, 45 }
499
 #define DEFAULT_MAX_FEEDRATE          { 60, 60, 20, 45 }
492
 
500
 
493
 /**
501
 /**
494
  * Default Max Acceleration (change/s) change = mm/s
502
  * Default Max Acceleration (change/s) change = mm/s
503
+ * (Maximum start speed for accelerated moves)
495
  * Override with M201
504
  * Override with M201
496
- *
497
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
505
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
498
  */
506
  */
499
 #define DEFAULT_MAX_ACCELERATION      { 2000, 2000, 30, 10000 }
507
 #define DEFAULT_MAX_ACCELERATION      { 2000, 2000, 30, 10000 }
500
 
508
 

+ 11
- 3
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

145
 // :[1, 2, 3, 4]
145
 // :[1, 2, 3, 4]
146
 #define EXTRUDERS 1
146
 #define EXTRUDERS 1
147
 
147
 
148
+// Enable if your E steppers or extruder gear ratios are not identical
149
+//#define DISTINCT_E_FACTORS
150
+
148
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
151
 // For Cyclops or any "multi-extruder" that shares a single nozzle.
149
 //#define SINGLENOZZLE
152
 //#define SINGLENOZZLE
150
 
153
 
462
  *
465
  *
463
  * These settings can be reset by M502
466
  * These settings can be reset by M502
464
  *
467
  *
468
+ * You can set distinct factors for each E stepper, if needed.
469
+ * If fewer factors are given, the last will apply to the rest.
470
+ *
465
  * Note that if EEPROM is enabled, saved values will override these.
471
  * Note that if EEPROM is enabled, saved values will override these.
466
  */
472
  */
467
 
473
 
468
 /**
474
 /**
469
  * Default Axis Steps Per Unit (steps/mm)
475
  * Default Axis Steps Per Unit (steps/mm)
470
  * Override with M92
476
  * Override with M92
477
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
471
  */
478
  */
472
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.1, 71.1, 2560, 600 } // David TVRR
479
 #define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.1, 71.1, 2560, 600 } // David TVRR
473
 
480
 
474
-//#define DEFAULT_AXIS_STEPS_PER_UNIT   {79.87, 79.87, 2566, 563,78} // Al's TVRR
481
+//#define DEFAULT_AXIS_STEPS_PER_UNIT   { 79.87, 79.87, 2566, 563.78 } // Al's TVRR
475
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   { 81.26, 80.01, 2561, 599.14 } // Michel TVRR old
482
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   { 81.26, 80.01, 2561, 599.14 } // Michel TVRR old
476
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.1, 71.1, 2560, 739.65 } // Michel TVRR
483
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   { 71.1, 71.1, 2560, 739.65 } // Michel TVRR
477
 
484
 
478
 /**
485
 /**
479
  * Default Max Feed Rate (mm/s)
486
  * Default Max Feed Rate (mm/s)
480
  * Override with M203
487
  * Override with M203
488
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
481
  */
489
  */
482
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 45 } // David TVRR
490
 #define DEFAULT_MAX_FEEDRATE          { 500, 500, 5, 45 } // David TVRR
483
 
491
 
484
 /**
492
 /**
485
  * Default Max Acceleration (change/s) change = mm/s
493
  * Default Max Acceleration (change/s) change = mm/s
494
+ * (Maximum start speed for accelerated moves)
486
  * Override with M201
495
  * Override with M201
487
- *
488
- * Maximum start speed for accelerated moves: { X, Y, Z, E }
496
+ *                                      X, Y, Z, E0 [, E1[, E2[, E3]]]
489
  */
497
  */
490
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
498
 #define DEFAULT_MAX_ACCELERATION      { 9000, 9000, 100, 10000 }
491
 
499
 

+ 63
- 35
Marlin/planner.cpp View File

78
  * A ring buffer of moves described in steps
78
  * A ring buffer of moves described in steps
79
  */
79
  */
80
 block_t Planner::block_buffer[BLOCK_BUFFER_SIZE];
80
 block_t Planner::block_buffer[BLOCK_BUFFER_SIZE];
81
-volatile uint8_t Planner::block_buffer_head = 0;           // Index of the next block to be pushed
82
-volatile uint8_t Planner::block_buffer_tail = 0;
81
+volatile uint8_t Planner::block_buffer_head = 0,           // Index of the next block to be pushed
82
+                 Planner::block_buffer_tail = 0;
83
 
83
 
84
-float Planner::max_feedrate_mm_s[NUM_AXIS], // Max speeds in mm per second
85
-      Planner::axis_steps_per_mm[NUM_AXIS],
86
-      Planner::steps_to_mm[NUM_AXIS];
84
+float Planner::max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second
85
+      Planner::axis_steps_per_mm[XYZE_N],
86
+      Planner::steps_to_mm[XYZE_N];
87
 
87
 
88
-uint32_t Planner::max_acceleration_steps_per_s2[NUM_AXIS],
89
-         Planner::max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software
88
+#if ENABLED(DISTINCT_E_FACTORS)
89
+  uint8_t Planner::last_extruder = 0;     // Respond to extruder change
90
+#endif
91
+
92
+uint32_t Planner::max_acceleration_steps_per_s2[XYZE_N],
93
+         Planner::max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software
90
 
94
 
91
 millis_t Planner::min_segment_time;
95
 millis_t Planner::min_segment_time;
92
 float Planner::min_feedrate_mm_s,
96
 float Planner::min_feedrate_mm_s,
650
     lround(a * axis_steps_per_mm[X_AXIS]),
654
     lround(a * axis_steps_per_mm[X_AXIS]),
651
     lround(b * axis_steps_per_mm[Y_AXIS]),
655
     lround(b * axis_steps_per_mm[Y_AXIS]),
652
     lround(c * axis_steps_per_mm[Z_AXIS]),
656
     lround(c * axis_steps_per_mm[Z_AXIS]),
653
-    lround(e * axis_steps_per_mm[E_AXIS])
657
+    lround(e * axis_steps_per_mm[E_AXIS_N])
654
   };
658
   };
655
-  
659
+
660
+  // When changing extruders recalculate steps corresponding to the E position
661
+  #if ENABLED(DISTINCT_E_FACTORS)
662
+    if (last_extruder != extruder && axis_steps_per_mm[E_AXIS_N] != axis_steps_per_mm[E_AXIS + last_extruder]) {
663
+      position[E_AXIS] = lround(position[E_AXIS] * axis_steps_per_mm[E_AXIS_N] * steps_to_mm[E_AXIS + last_extruder]);
664
+      last_extruder = extruder;
665
+    }
666
+  #endif
667
+
656
   #if ENABLED(LIN_ADVANCE)
668
   #if ENABLED(LIN_ADVANCE)
657
     float target_float[XYZE] = {a, b, c, e};
669
     float target_float[XYZE] = {a, b, c, e};
658
     float de_float = target_float[E_AXIS] - position_float[E_AXIS];
670
     float de_float = target_float[E_AXIS] - position_float[E_AXIS];
702
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
714
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
703
       }
715
       }
704
       #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
716
       #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
705
-        if (labs(de) > (int32_t)axis_steps_per_mm[E_AXIS] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
717
+        if (labs(de) > (int32_t)axis_steps_per_mm[E_AXIS_N] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int
706
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
718
           position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
707
           de = 0; // no difference
719
           de = 0; // no difference
708
           SERIAL_ECHO_START;
720
           SERIAL_ECHO_START;
941
     delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
953
     delta_mm[Y_AXIS] = db * steps_to_mm[Y_AXIS];
942
     delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
954
     delta_mm[Z_AXIS] = dc * steps_to_mm[Z_AXIS];
943
   #endif
955
   #endif
944
-  delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS];
956
+  delta_mm[E_AXIS] = esteps_float * steps_to_mm[E_AXIS_N];
945
 
957
 
946
   if (block->steps[X_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[Y_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[Z_AXIS] < MIN_STEPS_PER_SEGMENT) {
958
   if (block->steps[X_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[Y_AXIS] < MIN_STEPS_PER_SEGMENT && block->steps[Z_AXIS] < MIN_STEPS_PER_SEGMENT) {
947
     block->millimeters = fabs(delta_mm[E_AXIS]);
959
     block->millimeters = fabs(delta_mm[E_AXIS]);
1091
     accel = ceil(retract_acceleration * steps_per_mm);
1103
     accel = ceil(retract_acceleration * steps_per_mm);
1092
   }
1104
   }
1093
   else {
1105
   else {
1094
-    #define LIMIT_ACCEL_LONG(AXIS) do{ \
1095
-      if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS] < accel) { \
1096
-        const uint32_t comp = max_acceleration_steps_per_s2[AXIS] * block->step_event_count; \
1106
+    #define LIMIT_ACCEL_LONG(AXIS,INDX) do{ \
1107
+      if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS+INDX] < accel) { \
1108
+        const uint32_t comp = max_acceleration_steps_per_s2[AXIS+INDX] * block->step_event_count; \
1097
         if (accel * block->steps[AXIS] > comp) accel = comp / block->steps[AXIS]; \
1109
         if (accel * block->steps[AXIS] > comp) accel = comp / block->steps[AXIS]; \
1098
       } \
1110
       } \
1099
     }while(0)
1111
     }while(0)
1100
 	
1112
 	
1101
-    #define LIMIT_ACCEL_FLOAT(AXIS) do{ \
1102
-      if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS] < accel) { \
1103
-        const float comp = (float)max_acceleration_steps_per_s2[AXIS] * (float)block->step_event_count; \
1113
+    #define LIMIT_ACCEL_FLOAT(AXIS,INDX) do{ \
1114
+      if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS+INDX] < accel) { \
1115
+        const float comp = (float)max_acceleration_steps_per_s2[AXIS+INDX] * (float)block->step_event_count; \
1104
         if ((float)accel * (float)block->steps[AXIS] > comp) accel = comp / (float)block->steps[AXIS]; \
1116
         if ((float)accel * (float)block->steps[AXIS] > comp) accel = comp / (float)block->steps[AXIS]; \
1105
       } \
1117
       } \
1106
     }while(0)
1118
     }while(0)
1109
     accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
1121
     accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
1110
 
1122
 
1111
     // Limit acceleration per axis
1123
     // Limit acceleration per axis
1112
-    if (block->step_event_count <= cutoff_long){
1113
-      LIMIT_ACCEL_LONG(X_AXIS);
1114
-      LIMIT_ACCEL_LONG(Y_AXIS);
1115
-      LIMIT_ACCEL_LONG(Z_AXIS);
1116
-      LIMIT_ACCEL_LONG(E_AXIS);
1117
-    } else {
1118
-      LIMIT_ACCEL_FLOAT(X_AXIS);
1119
-      LIMIT_ACCEL_FLOAT(Y_AXIS);
1120
-      LIMIT_ACCEL_FLOAT(Z_AXIS);
1121
-      LIMIT_ACCEL_FLOAT(E_AXIS);
1124
+    if (block->step_event_count <= cutoff_long) {
1125
+      LIMIT_ACCEL_LONG(X_AXIS,0);
1126
+      LIMIT_ACCEL_LONG(Y_AXIS,0);
1127
+      LIMIT_ACCEL_LONG(Z_AXIS,0);
1128
+      LIMIT_ACCEL_LONG(E_AXIS,extruder);
1129
+    }
1130
+    else {
1131
+      LIMIT_ACCEL_FLOAT(X_AXIS,0);
1132
+      LIMIT_ACCEL_FLOAT(Y_AXIS,0);
1133
+      LIMIT_ACCEL_FLOAT(Z_AXIS,0);
1134
+      LIMIT_ACCEL_FLOAT(E_AXIS,extruder);
1122
     }
1135
     }
1123
   }
1136
   }
1124
   block->acceleration_steps_per_s2 = accel;
1137
   block->acceleration_steps_per_s2 = accel;
1302
     }
1315
     }
1303
     else {
1316
     else {
1304
       block->use_advance_lead = true;
1317
       block->use_advance_lead = true;
1305
-      block->abs_adv_steps_multiplier8 = lround(extruder_advance_k * (de_float / mm_D_float) * block->nominal_speed / (float)block->nominal_rate * axis_steps_per_mm[E_AXIS] * 256.0);
1318
+      block->abs_adv_steps_multiplier8 = lround(extruder_advance_k * (de_float / mm_D_float) * block->nominal_speed / (float)block->nominal_rate * axis_steps_per_mm[E_AXIS_N] * 256.0);
1306
     }
1319
     }
1307
 
1320
 
1308
   #elif ENABLED(ADVANCE)
1321
   #elif ENABLED(ADVANCE)
1350
  */
1363
  */
1351
 
1364
 
1352
 void Planner::_set_position_mm(const float &a, const float &b, const float &c, const float &e) {
1365
 void Planner::_set_position_mm(const float &a, const float &b, const float &c, const float &e) {
1366
+  #if ENABLED(DISTINCT_E_FACTORS)
1367
+    #define _EINDEX (E_AXIS + active_extruder)
1368
+    last_extruder = active_extruder;
1369
+  #else
1370
+    #define _EINDEX E_AXIS
1371
+  #endif
1353
   long na = position[X_AXIS] = lround(a * axis_steps_per_mm[X_AXIS]),
1372
   long na = position[X_AXIS] = lround(a * axis_steps_per_mm[X_AXIS]),
1354
        nb = position[Y_AXIS] = lround(b * axis_steps_per_mm[Y_AXIS]),
1373
        nb = position[Y_AXIS] = lround(b * axis_steps_per_mm[Y_AXIS]),
1355
        nc = position[Z_AXIS] = lround(c * axis_steps_per_mm[Z_AXIS]),
1374
        nc = position[Z_AXIS] = lround(c * axis_steps_per_mm[Z_AXIS]),
1356
-       ne = position[E_AXIS] = lround(e * axis_steps_per_mm[E_AXIS]);
1375
+       ne = position[E_AXIS] = lround(e * axis_steps_per_mm[_EINDEX]);
1357
   stepper.set_position(na, nb, nc, ne);
1376
   stepper.set_position(na, nb, nc, ne);
1358
   previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
1377
   previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
1359
-
1360
   ZERO(previous_speed);
1378
   ZERO(previous_speed);
1361
 }
1379
 }
1362
 
1380
 
1375
   #endif
1393
   #endif
1376
 }
1394
 }
1377
 
1395
 
1378
-
1379
 /**
1396
 /**
1380
  * Sync from the stepper positions. (e.g., after an interrupted move)
1397
  * Sync from the stepper positions. (e.g., after an interrupted move)
1381
  */
1398
  */
1387
  * Setters for planner position (also setting stepper position).
1404
  * Setters for planner position (also setting stepper position).
1388
  */
1405
  */
1389
 void Planner::set_position_mm(const AxisEnum axis, const float& v) {
1406
 void Planner::set_position_mm(const AxisEnum axis, const float& v) {
1390
-  position[axis] = lround(v * axis_steps_per_mm[axis]);
1407
+  #if ENABLED(DISTINCT_E_FACTORS)
1408
+    const uint8_t axis_index = axis + (axis == E_AXIS ? active_extruder : 0);
1409
+    last_extruder = active_extruder;
1410
+  #else
1411
+    const uint8_t axis_index = axis;
1412
+  #endif
1413
+  position[axis] = lround(v * axis_steps_per_mm[axis_index]);
1391
   stepper.set_position(axis, v);
1414
   stepper.set_position(axis, v);
1392
   previous_speed[axis] = 0.0;
1415
   previous_speed[axis] = 0.0;
1393
 }
1416
 }
1394
 
1417
 
1395
 // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
1418
 // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
1396
 void Planner::reset_acceleration_rates() {
1419
 void Planner::reset_acceleration_rates() {
1420
+  #if ENABLED(DISTINCT_E_FACTORS)
1421
+    #define HIGHEST_CONDITION (i < E_AXIS || i == E_AXIS + active_extruder)
1422
+  #else
1423
+    #define HIGHEST_CONDITION true
1424
+  #endif
1397
   uint32_t highest_rate = 1;
1425
   uint32_t highest_rate = 1;
1398
-  LOOP_XYZE(i) {
1426
+  LOOP_XYZE_N(i) {
1399
     max_acceleration_steps_per_s2[i] = max_acceleration_mm_per_s2[i] * axis_steps_per_mm[i];
1427
     max_acceleration_steps_per_s2[i] = max_acceleration_mm_per_s2[i] * axis_steps_per_mm[i];
1400
-    NOLESS(highest_rate, max_acceleration_steps_per_s2[i]);
1428
+    if (HIGHEST_CONDITION) NOLESS(highest_rate, max_acceleration_steps_per_s2[i]);
1401
   }
1429
   }
1402
   cutoff_long = 4294967295UL / highest_rate;
1430
   cutoff_long = 4294967295UL / highest_rate;
1403
 }
1431
 }
1404
 
1432
 
1405
 // Recalculate position, steps_to_mm if axis_steps_per_mm changes!
1433
 // Recalculate position, steps_to_mm if axis_steps_per_mm changes!
1406
 void Planner::refresh_positioning() {
1434
 void Planner::refresh_positioning() {
1407
-  LOOP_XYZE(i) steps_to_mm[i] = 1.0 / axis_steps_per_mm[i];
1435
+  LOOP_XYZE_N(i) steps_to_mm[i] = 1.0 / axis_steps_per_mm[i];
1408
   set_position_mm_kinematic(current_position);
1436
   set_position_mm_kinematic(current_position);
1409
   reset_acceleration_rates();
1437
   reset_acceleration_rates();
1410
 }
1438
 }

+ 24
- 14
Marlin/planner.h View File

140
      * A ring buffer of moves described in steps
140
      * A ring buffer of moves described in steps
141
      */
141
      */
142
     static block_t block_buffer[BLOCK_BUFFER_SIZE];
142
     static block_t block_buffer[BLOCK_BUFFER_SIZE];
143
-    static volatile uint8_t block_buffer_head;           // Index of the next block to be pushed
144
-    static volatile uint8_t block_buffer_tail;
143
+    static volatile uint8_t block_buffer_head,  // Index of the next block to be pushed
144
+                            block_buffer_tail;
145
 
145
 
146
-    static float max_feedrate_mm_s[NUM_AXIS]; // Max speeds in mm per second
147
-    static float axis_steps_per_mm[NUM_AXIS];
148
-    static float steps_to_mm[NUM_AXIS];
149
-    static unsigned long max_acceleration_steps_per_s2[NUM_AXIS];
150
-    static unsigned long max_acceleration_mm_per_s2[NUM_AXIS]; // Use M201 to override by software
146
+    #if ENABLED(DISTINCT_E_FACTORS)
147
+      static uint8_t last_extruder;             // Respond to extruder change
148
+    #endif
149
+
150
+    static float max_feedrate_mm_s[XYZE_N],     // Max speeds in mm per second
151
+                 axis_steps_per_mm[XYZE_N],
152
+                 steps_to_mm[XYZE_N];
153
+    static unsigned long max_acceleration_steps_per_s2[XYZE_N],
154
+                         max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software
151
 
155
 
152
     static millis_t min_segment_time;
156
     static millis_t min_segment_time;
153
-    static float min_feedrate_mm_s;
154
-    static float acceleration;         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
155
-    static float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
156
-    static float travel_acceleration;  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
157
-    static float max_jerk[XYZE];       // The largest speed change requiring no acceleration
158
-    static float min_travel_feedrate_mm_s;
157
+    static float min_feedrate_mm_s,
158
+                 acceleration,         // Normal acceleration mm/s^2  DEFAULT ACCELERATION for all printing moves. M204 SXXXX
159
+                 retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
160
+                 travel_acceleration,  // Travel acceleration mm/s^2  DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
161
+                 max_jerk[XYZE],       // The largest speed change requiring no acceleration
162
+                 min_travel_feedrate_mm_s;
159
 
163
 
160
     #if HAS_ABL
164
     #if HAS_ABL
161
       static bool abl_enabled;            // Flag that bed leveling is enabled
165
       static bool abl_enabled;            // Flag that bed leveling is enabled
343
     static void set_position_mm_kinematic(const float position[NUM_AXIS]);
347
     static void set_position_mm_kinematic(const float position[NUM_AXIS]);
344
     static void set_position_mm(const AxisEnum axis, const float &v);
348
     static void set_position_mm(const AxisEnum axis, const float &v);
345
     static FORCE_INLINE void set_z_position_mm(const float &z) { set_position_mm(Z_AXIS, z); }
349
     static FORCE_INLINE void set_z_position_mm(const float &z) { set_position_mm(Z_AXIS, z); }
346
-    static FORCE_INLINE void set_e_position_mm(const float &e) { set_position_mm(E_AXIS, e); }
350
+    static FORCE_INLINE void set_e_position_mm(const float &e) {
351
+      set_position_mm(E_AXIS
352
+        #if ENABLED(DISTINCT_E_FACTORS)
353
+          + active_extruder
354
+        #endif
355
+      , e);
356
+    }
347
 
357
 
348
     /**
358
     /**
349
      * Sync from the stepper positions. (e.g., after an interrupted move)
359
      * Sync from the stepper positions. (e.g., after an interrupted move)

+ 85
- 3
Marlin/ultralcd.cpp View File

1850
   void lcd_control_temperature_preheat_material2_settings_menu() { _lcd_control_temperature_preheat_settings_menu(1); }
1850
   void lcd_control_temperature_preheat_material2_settings_menu() { _lcd_control_temperature_preheat_settings_menu(1); }
1851
 
1851
 
1852
   void _reset_acceleration_rates() { planner.reset_acceleration_rates(); }
1852
   void _reset_acceleration_rates() { planner.reset_acceleration_rates(); }
1853
+  #if ENABLED(DISTINCT_E_FACTORS)
1854
+    void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) _reset_acceleration_rates(); }
1855
+    void _reset_e0_acceleration_rate() { _reset_e_acceleration_rate(0); }
1856
+    void _reset_e1_acceleration_rate() { _reset_e_acceleration_rate(1); }
1857
+    #if E_STEPPERS > 2
1858
+      void _reset_e2_acceleration_rate() { _reset_e_acceleration_rate(2); }
1859
+      #if E_STEPPERS > 3
1860
+        void _reset_e3_acceleration_rate() { _reset_e_acceleration_rate(3); }
1861
+      #endif
1862
+    #endif
1863
+  #endif
1864
+
1853
   void _planner_refresh_positioning() { planner.refresh_positioning(); }
1865
   void _planner_refresh_positioning() { planner.refresh_positioning(); }
1866
+  #if ENABLED(DISTINCT_E_FACTORS)
1867
+    void _planner_refresh_e_positioning(const uint8_t e) {
1868
+      if (e == active_extruder)
1869
+        _planner_refresh_positioning();
1870
+      else
1871
+        planner.steps_to_mm[i] = 1.0 / planner.axis_steps_per_mm[i];
1872
+    }
1873
+    void _planner_refresh_e0_positioning() { _reset_e_acceleration_rate(0); }
1874
+    void _planner_refresh_e1_positioning() { _reset_e_acceleration_rate(1); }
1875
+    #if E_STEPPERS > 2
1876
+      void _planner_refresh_e2_positioning() { _reset_e_acceleration_rate(2); }
1877
+      #if E_STEPPERS > 3
1878
+        void _planner_refresh_e3_positioning() { _reset_e_acceleration_rate(3); }
1879
+      #endif
1880
+    #endif
1881
+  #endif
1854
 
1882
 
1855
   /**
1883
   /**
1856
    *
1884
    *
1876
       MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 0.1, 990);
1904
       MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 0.1, 990);
1877
     #endif
1905
     #endif
1878
     MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
1906
     MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
1907
+
1908
+    //
1909
+    // M203 Settings
1910
+    //
1879
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999);
1911
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999);
1880
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999);
1912
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999);
1881
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999);
1913
     MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999);
1882
-    MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999);
1914
+
1915
+    #if ENABLED(DISTINCT_E_FACTORS)
1916
+      MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS + active_extruder], 1, 999);
1917
+      MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E1, &planner.max_feedrate_mm_s[E_AXIS], 1, 999);
1918
+      MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E2, &planner.max_feedrate_mm_s[E_AXIS + 1], 1, 999);
1919
+      #if E_STEPPERS > 2
1920
+        MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.max_feedrate_mm_s[E_AXIS + 2], 1, 999);
1921
+        #if E_STEPPERS > 3
1922
+          MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E3, &planner.max_feedrate_mm_s[E_AXIS + 3], 1, 999);
1923
+        #endif
1924
+      #endif
1925
+    #else
1926
+      MENU_ITEM_EDIT(float3, MSG_VMAX MSG_E, &planner.max_feedrate_mm_s[E_AXIS], 1, 999);
1927
+    #endif
1928
+
1883
     MENU_ITEM_EDIT(float3, MSG_VMIN, &planner.min_feedrate_mm_s, 0, 999);
1929
     MENU_ITEM_EDIT(float3, MSG_VMIN, &planner.min_feedrate_mm_s, 0, 999);
1884
     MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.min_travel_feedrate_mm_s, 0, 999);
1930
     MENU_ITEM_EDIT(float3, MSG_VTRAV_MIN, &planner.min_travel_feedrate_mm_s, 0, 999);
1931
+
1932
+    //
1933
+    // M201 Settings
1934
+    //
1885
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &planner.max_acceleration_mm_per_s2[X_AXIS], 100, 99000, _reset_acceleration_rates);
1935
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_X, &planner.max_acceleration_mm_per_s2[X_AXIS], 100, 99000, _reset_acceleration_rates);
1886
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &planner.max_acceleration_mm_per_s2[Y_AXIS], 100, 99000, _reset_acceleration_rates);
1936
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Y, &planner.max_acceleration_mm_per_s2[Y_AXIS], 100, 99000, _reset_acceleration_rates);
1887
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &planner.max_acceleration_mm_per_s2[Z_AXIS], 10, 99000, _reset_acceleration_rates);
1937
     MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_Z, &planner.max_acceleration_mm_per_s2[Z_AXIS], 10, 99000, _reset_acceleration_rates);
1888
-    MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
1938
+
1939
+    #if ENABLED(DISTINCT_E_FACTORS)
1940
+      MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS + active_extruder], 100, 99000, _reset_acceleration_rates);
1941
+      MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E1, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_e0_acceleration_rate);
1942
+      MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E2, &planner.max_acceleration_mm_per_s2[E_AXIS + 1], 100, 99000, _reset_e1_acceleration_rate);
1943
+      #if E_STEPPERS > 2
1944
+        MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E3, &planner.max_acceleration_mm_per_s2[E_AXIS + 2], 100, 99000, _reset_e2_acceleration_rate);
1945
+        #if E_STEPPERS > 3
1946
+          MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E4, &planner.max_acceleration_mm_per_s2[E_AXIS + 3], 100, 99000, _reset_e3_acceleration_rate);
1947
+        #endif
1948
+      #endif
1949
+    #else
1950
+      MENU_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_E, &planner.max_acceleration_mm_per_s2[E_AXIS], 100, 99000, _reset_acceleration_rates);
1951
+    #endif
1952
+
1889
     MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.retract_acceleration, 100, 99000);
1953
     MENU_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.retract_acceleration, 100, 99000);
1890
     MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.travel_acceleration, 100, 99000);
1954
     MENU_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.travel_acceleration, 100, 99000);
1955
+
1956
+    //
1957
+    // M92 Settings
1958
+    //
1891
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_XSTEPS, &planner.axis_steps_per_mm[X_AXIS], 5, 9999, _planner_refresh_positioning);
1959
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_XSTEPS, &planner.axis_steps_per_mm[X_AXIS], 5, 9999, _planner_refresh_positioning);
1892
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_YSTEPS, &planner.axis_steps_per_mm[Y_AXIS], 5, 9999, _planner_refresh_positioning);
1960
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_YSTEPS, &planner.axis_steps_per_mm[Y_AXIS], 5, 9999, _planner_refresh_positioning);
1893
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning);
1961
     MENU_ITEM_EDIT_CALLBACK(float62, MSG_ZSTEPS, &planner.axis_steps_per_mm[Z_AXIS], 5, 9999, _planner_refresh_positioning);
1894
-    MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
1962
+
1963
+    #if ENABLED(DISTINCT_E_FACTORS)
1964
+      MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS + active_extruder], 5, 9999, _planner_refresh_positioning);
1965
+      MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS MSG_E1, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_e0_positioning);
1966
+      MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS MSG_E2, &planner.axis_steps_per_mm[E_AXIS + 1], 5, 9999, _planner_refresh_e1_positioning);
1967
+      #if E_STEPPERS > 2
1968
+        MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS MSG_E3, &planner.axis_steps_per_mm[E_AXIS + 2], 5, 9999, _planner_refresh_e2_positioning);
1969
+        #if E_STEPPERS > 3
1970
+          MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS MSG_E4, &planner.axis_steps_per_mm[E_AXIS + 3], 5, 9999, _planner_refresh_e3_positioning);
1971
+        #endif
1972
+      #endif
1973
+    #else
1974
+      MENU_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning);
1975
+    #endif
1976
+
1895
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
1977
     #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
1896
       MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit);
1978
       MENU_ITEM_EDIT(bool, MSG_ENDSTOP_ABORT, &stepper.abort_on_endstop_hit);
1897
     #endif
1979
     #endif

Loading…
Cancel
Save