浏览代码

Add Filament Change accelerations

Sean 7 年前
父节点
当前提交
2d9b0a66fe

+ 38
- 33
Marlin/Configuration_adv.h 查看文件

900
  */
900
  */
901
 //#define ADVANCED_PAUSE_FEATURE
901
 //#define ADVANCED_PAUSE_FEATURE
902
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
902
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
903
-  #define PAUSE_PARK_RETRACT_FEEDRATE 60      // (mm/s) Initial retract feedrate.
904
-  #define PAUSE_PARK_RETRACT_LENGTH 2         // (mm) Initial retract.
905
-                                              // This short retract is done immediately, before parking the nozzle.
906
-  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // (mm/s) Unload filament feedrate. This can be pretty fast.
907
-  #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // (mm) The length of filament for a complete unload.
908
-                                              //   For Bowden, the full length of the tube and nozzle.
909
-                                              //   For direct drive, the full length of the nozzle.
910
-                                              //   Set to 0 for manual unloading.
911
-  #define FILAMENT_CHANGE_LOAD_FEEDRATE 6     // (mm/s) Load filament feedrate. This can be pretty fast.
912
-  #define FILAMENT_CHANGE_LOAD_LENGTH 0       // (mm) Load length of filament, from extruder gear to nozzle.
913
-                                              //   For Bowden, the full length of the tube and nozzle.
914
-                                              //   For direct drive, the full length of the nozzle.
915
-  #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3   // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
916
-  #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50    // (mm) Length to extrude after loading.
917
-                                              //   Set to 0 for manual extrusion.
918
-                                              //   Filament can be extruded repeatedly from the Filament Change menu
919
-                                              //   until extrusion is consistent, and to purge old filament.
920
-
921
-                                              // Filament Unload does a Retract, Delay, and Purge first:
922
-  #define FILAMENT_UNLOAD_RETRACT_LENGTH 13   // (mm) Unload initial retract length.
923
-  #define FILAMENT_UNLOAD_DELAY 5000          // (ms) Delay for the filament to cool after retract.
924
-  #define FILAMENT_UNLOAD_PURGE_LENGTH 8      // (mm) An unretract is done, then this length is purged.
925
-  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE   // Purge continuously up to the purge length until interrupted.
926
-
927
-  #define PAUSE_PARK_NOZZLE_TIMEOUT 45        // (seconds) Time limit before the nozzle is turned off for safety.
928
-  #define FILAMENT_CHANGE_ALERT_BEEPS 10      // Number of alert beeps to play when a response is needed.
929
-  #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable for XYZ steppers to stay powered on during filament change.
930
-
931
-  //#define PARK_HEAD_ON_PAUSE                // Park the nozzle during pause and filament change.
932
-  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
933
-
934
-  //#define FILAMENT_LOAD_UNLOAD_GCODES       // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
935
-  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS     // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
903
+  #define PAUSE_PARK_RETRACT_FEEDRATE         60  // (mm/s) Initial retract feedrate.
904
+  #define PAUSE_PARK_RETRACT_LENGTH            2  // (mm) Initial retract.
905
+                                                  // This short retract is done immediately, before parking the nozzle.
906
+  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     10  // (mm/s) Unload filament feedrate. This can be pretty fast.
907
+  #define FILAMENT_CHANGE_UNLOAD_ACCEL        25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
908
+  #define FILAMENT_CHANGE_UNLOAD_LENGTH      100  // (mm) The length of filament for a complete unload.
909
+                                                  //   For Bowden, the full length of the tube and nozzle.
910
+                                                  //   For direct drive, the full length of the nozzle.
911
+                                                  //   Set to 0 for manual unloading.
912
+  #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE   6  // (mm/s) Slow move when starting load.
913
+  #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH     0  // (mm) Slow length, to allow time to insert material.
914
+                                                  // 0 to disable start loading and skip to fast load only
915
+  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE   6  // (mm/s) Load filament feedrate. This can be pretty fast.
916
+  #define FILAMENT_CHANGE_FAST_LOAD_ACCEL     25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
917
+  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH     0  // (mm) Load length of filament, from extruder gear to nozzle.
918
+                                                  //   For Bowden, the full length of the tube and nozzle.
919
+                                                  //   For direct drive, the full length of the nozzle.
920
+  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE       // Purge continuously up to the purge length until interrupted.
921
+  #define ADVANCED_PAUSE_PURGE_FEEDRATE        3  // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
922
+  #define ADVANCED_PAUSE_PURGE_LENGTH         50  // (mm) Length to extrude after loading.
923
+                                                  //   Set to 0 for manual extrusion.
924
+                                                  //   Filament can be extruded repeatedly from the Filament Change menu
925
+                                                  //   until extrusion is consistent, and to purge old filament.
926
+
927
+                                                  // Filament Unload does a Retract, Delay, and Purge first:
928
+  #define FILAMENT_UNLOAD_RETRACT_LENGTH      13  // (mm) Unload initial retract length.
929
+  #define FILAMENT_UNLOAD_DELAY             5000  // (ms) Delay for the filament to cool after retract.
930
+  #define FILAMENT_UNLOAD_PURGE_LENGTH         8  // (mm) An unretract is done, then this length is purged.
931
+
932
+  #define PAUSE_PARK_NOZZLE_TIMEOUT           45  // (seconds) Time limit before the nozzle is turned off for safety.
933
+  #define FILAMENT_CHANGE_ALERT_BEEPS         10  // Number of alert beeps to play when a response is needed.
934
+  #define PAUSE_PARK_NO_STEPPER_TIMEOUT           // Enable for XYZ steppers to stay powered on during filament change.
935
+
936
+  //#define PARK_HEAD_ON_PAUSE                    // Park the nozzle during pause and filament change.
937
+  //#define HOME_BEFORE_FILAMENT_CHANGE           // Ensure homing has been completed prior to parking for filament change
938
+
939
+  //#define FILAMENT_LOAD_UNLOAD_GCODES           // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
940
+  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
936
 #endif
941
 #endif
937
 
942
 
938
 // @section tmc
943
 // @section tmc

+ 38
- 33
Marlin/src/config/default/Configuration_adv.h 查看文件

900
  */
900
  */
901
 //#define ADVANCED_PAUSE_FEATURE
901
 //#define ADVANCED_PAUSE_FEATURE
902
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
902
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
903
-  #define PAUSE_PARK_RETRACT_FEEDRATE 60      // (mm/s) Initial retract feedrate.
904
-  #define PAUSE_PARK_RETRACT_LENGTH 2         // (mm) Initial retract.
905
-                                              // This short retract is done immediately, before parking the nozzle.
906
-  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // (mm/s) Unload filament feedrate. This can be pretty fast.
907
-  #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // (mm) The length of filament for a complete unload.
908
-                                              //   For Bowden, the full length of the tube and nozzle.
909
-                                              //   For direct drive, the full length of the nozzle.
910
-                                              //   Set to 0 for manual unloading.
911
-  #define FILAMENT_CHANGE_LOAD_FEEDRATE 6     // (mm/s) Load filament feedrate. This can be pretty fast.
912
-  #define FILAMENT_CHANGE_LOAD_LENGTH 0       // (mm) Load length of filament, from extruder gear to nozzle.
913
-                                              //   For Bowden, the full length of the tube and nozzle.
914
-                                              //   For direct drive, the full length of the nozzle.
915
-  #define ADVANCED_PAUSE_EXTRUDE_FEEDRATE 3   // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
916
-  #define ADVANCED_PAUSE_EXTRUDE_LENGTH 50    // (mm) Length to extrude after loading.
917
-                                              //   Set to 0 for manual extrusion.
918
-                                              //   Filament can be extruded repeatedly from the Filament Change menu
919
-                                              //   until extrusion is consistent, and to purge old filament.
920
-
921
-                                              // Filament Unload does a Retract, Delay, and Purge first:
922
-  #define FILAMENT_UNLOAD_RETRACT_LENGTH 13   // (mm) Unload initial retract length.
923
-  #define FILAMENT_UNLOAD_DELAY 5000          // (ms) Delay for the filament to cool after retract.
924
-  #define FILAMENT_UNLOAD_PURGE_LENGTH 8      // (mm) An unretract is done, then this length is purged.
925
-  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE   // Purge continuously up to the purge length until interrupted.
926
-
927
-  #define PAUSE_PARK_NOZZLE_TIMEOUT 45        // (seconds) Time limit before the nozzle is turned off for safety.
928
-  #define FILAMENT_CHANGE_ALERT_BEEPS 10      // Number of alert beeps to play when a response is needed.
929
-  #define PAUSE_PARK_NO_STEPPER_TIMEOUT       // Enable for XYZ steppers to stay powered on during filament change.
930
-
931
-  //#define PARK_HEAD_ON_PAUSE                // Park the nozzle during pause and filament change.
932
-  //#define HOME_BEFORE_FILAMENT_CHANGE       // Ensure homing has been completed prior to parking for filament change
933
-
934
-  //#define FILAMENT_LOAD_UNLOAD_GCODES       // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
935
-  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS     // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
903
+  #define PAUSE_PARK_RETRACT_FEEDRATE         60  // (mm/s) Initial retract feedrate.
904
+  #define PAUSE_PARK_RETRACT_LENGTH            2  // (mm) Initial retract.
905
+                                                  // This short retract is done immediately, before parking the nozzle.
906
+  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     10  // (mm/s) Unload filament feedrate. This can be pretty fast.
907
+  #define FILAMENT_CHANGE_UNLOAD_ACCEL        25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
908
+  #define FILAMENT_CHANGE_UNLOAD_LENGTH      100  // (mm) The length of filament for a complete unload.
909
+                                                  //   For Bowden, the full length of the tube and nozzle.
910
+                                                  //   For direct drive, the full length of the nozzle.
911
+                                                  //   Set to 0 for manual unloading.
912
+  #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE   6  // (mm/s) Slow move when starting load.
913
+  #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH     0  // (mm) Slow length, to allow time to insert material.
914
+                                                  // 0 to disable start loading and skip to fast load only
915
+  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE   6  // (mm/s) Load filament feedrate. This can be pretty fast.
916
+  #define FILAMENT_CHANGE_FAST_LOAD_ACCEL     25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
917
+  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH     0  // (mm) Load length of filament, from extruder gear to nozzle.
918
+                                                  //   For Bowden, the full length of the tube and nozzle.
919
+                                                  //   For direct drive, the full length of the nozzle.
920
+  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE       // Purge continuously up to the purge length until interrupted.
921
+  #define ADVANCED_PAUSE_PURGE_FEEDRATE        3  // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
922
+  #define ADVANCED_PAUSE_PURGE_LENGTH         50  // (mm) Length to extrude after loading.
923
+                                                  //   Set to 0 for manual extrusion.
924
+                                                  //   Filament can be extruded repeatedly from the Filament Change menu
925
+                                                  //   until extrusion is consistent, and to purge old filament.
926
+
927
+                                                  // Filament Unload does a Retract, Delay, and Purge first:
928
+  #define FILAMENT_UNLOAD_RETRACT_LENGTH      13  // (mm) Unload initial retract length.
929
+  #define FILAMENT_UNLOAD_DELAY             5000  // (ms) Delay for the filament to cool after retract.
930
+  #define FILAMENT_UNLOAD_PURGE_LENGTH         8  // (mm) An unretract is done, then this length is purged.
931
+
932
+  #define PAUSE_PARK_NOZZLE_TIMEOUT           45  // (seconds) Time limit before the nozzle is turned off for safety.
933
+  #define FILAMENT_CHANGE_ALERT_BEEPS         10  // Number of alert beeps to play when a response is needed.
934
+  #define PAUSE_PARK_NO_STEPPER_TIMEOUT           // Enable for XYZ steppers to stay powered on during filament change.
935
+
936
+  //#define PARK_HEAD_ON_PAUSE                    // Park the nozzle during pause and filament change.
937
+  //#define HOME_BEFORE_FILAMENT_CHANGE           // Ensure homing has been completed prior to parking for filament change
938
+
939
+  //#define FILAMENT_LOAD_UNLOAD_GCODES           // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
940
+  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
936
 #endif
941
 #endif
937
 
942
 
938
 // @section tmc
943
 // @section tmc

+ 33
- 9
Marlin/src/feature/pause.cpp 查看文件

137
  *
137
  *
138
  * Returns 'true' if load was completed, 'false' for abort
138
  * Returns 'true' if load was completed, 'false' for abort
139
  */
139
  */
140
-bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
140
+bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
141
                    const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
141
                    const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
142
                    const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
142
                    const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
143
 ) {
143
 ) {
184
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
184
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
185
   #endif
185
   #endif
186
 
186
 
187
-  // Load filament
188
-  if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
187
+  // Slow Load filament
188
+  if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
189
+
190
+  // Fast Load Filament
191
+  if (fast_load_length) {
192
+    #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
193
+      const float saved_acceleration = planner.retract_acceleration;
194
+      planner.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
195
+    #endif
196
+
197
+    do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
198
+
199
+    #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
200
+      planner.retract_acceleration = saved_acceleration;
201
+    #endif
202
+  }
189
 
203
 
190
   #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
204
   #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
191
 
205
 
196
 
210
 
197
     wait_for_user = true;
211
     wait_for_user = true;
198
     for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
212
     for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
199
-      do_pause_e_move(1, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
213
+      do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
200
     wait_for_user = false;
214
     wait_for_user = false;
201
 
215
 
202
   #else
216
   #else
210
         #endif
224
         #endif
211
 
225
 
212
         // Extrude filament to get into hotend
226
         // Extrude filament to get into hotend
213
-        do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
227
+        do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
214
       }
228
       }
215
 
229
 
216
       // Show "Purge More" / "Resume" menu and wait for reply
230
       // Show "Purge More" / "Resume" menu and wait for reply
233
       #endif
247
       #endif
234
     );
248
     );
235
 
249
 
236
-  #endif      
250
+  #endif
237
 
251
 
238
   return true;
252
   return true;
239
 }
253
 }
277
   do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
291
   do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.max_feedrate_mm_s[E_AXIS]);
278
 
292
 
279
   // Unload filament
293
   // Unload filament
294
+  #if FILAMENT_CHANGE_UNLOAD_ACCEL > 0
295
+    const float saved_acceleration = planner.retract_acceleration;
296
+    planner.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
297
+  #endif
298
+
280
   do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
299
   do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE);
281
 
300
 
301
+  #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
302
+    planner.retract_acceleration = saved_acceleration;
303
+  #endif
304
+
282
   // Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
305
   // Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
283
   #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
306
   #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN
284
     disable_e_stepper(active_extruder);
307
     disable_e_stepper(active_extruder);
477
  * - Send host action for resume, if configured
500
  * - Send host action for resume, if configured
478
  * - Resume the current SD print job, if any
501
  * - Resume the current SD print job, if any
479
  */
502
  */
480
-void resume_print(const float &load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
503
+void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
481
   if (!did_pause_print) return;
504
   if (!did_pause_print) return;
482
 
505
 
483
   // Re-enable the heaters if they timed out
506
   // Re-enable the heaters if they timed out
489
 
512
 
490
   if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
513
   if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
491
     // Load the new filament
514
     // Load the new filament
492
-    load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out);
515
+    load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out);
493
   }
516
   }
494
 
517
 
495
   #if ENABLED(ULTIPANEL)
518
   #if ENABLED(ULTIPANEL)
503
     if (fwretract.retracted[active_extruder])
526
     if (fwretract.retracted[active_extruder])
504
       do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
527
       do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
505
   #endif
528
   #endif
529
+
506
   // If resume_position is negative
530
   // If resume_position is negative
507
   if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
531
   if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
508
 
532
 
514
 
538
 
515
   // Now all extrusion positions are resumed and ready to be confirmed
539
   // Now all extrusion positions are resumed and ready to be confirmed
516
   // Set extruder to saved position
540
   // Set extruder to saved position
517
-  planner.set_e_position_mm(destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]);
541
+  planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]));
518
 
542
 
519
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
543
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
520
     runout.reset();
544
     runout.reset();

+ 2
- 2
Marlin/src/feature/pause.h 查看文件

71
 
71
 
72
 void wait_for_filament_reload(const int8_t max_beep_count=0);
72
 void wait_for_filament_reload(const int8_t max_beep_count=0);
73
 
73
 
74
-void resume_print(const float &load_length=0, const float &extrude_length=ADVANCED_PAUSE_EXTRUDE_LENGTH, const int8_t max_beep_count=0);
74
+void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, const int8_t max_beep_count=0);
75
 
75
 
76
-bool load_filament(const float &load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
76
+bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false,
77
                           const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
77
                           const bool pause_for_user=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
78
 
78
 
79
 bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);
79
 bool unload_filament(const float &unload_length, const bool show_lcd=false, const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT);

+ 10
- 7
Marlin/src/gcode/feature/pause/M600.cpp 查看文件

80
     #endif
80
     #endif
81
   );
81
   );
82
 
82
 
83
+  // Lift Z axis
84
+  if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
85
+
83
   // Move XY axes to filament change position or given position
86
   // Move XY axes to filament change position or given position
84
   if (parser.seenval('X')) park_point.x = parser.linearval('X');
87
   if (parser.seenval('X')) park_point.x = parser.linearval('X');
85
   if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
88
   if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
86
 
89
 
87
-  // Lift Z axis
88
-  if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
89
-
90
   #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
90
   #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) && DISABLED(DELTA)
91
     park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
91
     park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);
92
     park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
92
     park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0);
96
   const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
96
   const float unload_length = -FABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
97
                                                      : filament_change_unload_length[active_extruder]);
97
                                                      : filament_change_unload_length[active_extruder]);
98
 
98
 
99
-  // Load filament
100
-  const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
101
-                                                  : filament_change_load_length[active_extruder]);
99
+  // Slow load filament
100
+  constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
101
+
102
+  // Fast load filament
103
+  const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
104
+                                                       : filament_change_load_length[active_extruder]);
102
 
105
 
103
   const int beep_count = parser.intval('B',
106
   const int beep_count = parser.intval('B',
104
     #ifdef FILAMENT_CHANGE_ALERT_BEEPS
107
     #ifdef FILAMENT_CHANGE_ALERT_BEEPS
112
 
115
 
113
   if (pause_print(retract, park_point, unload_length, true)) {
116
   if (pause_print(retract, park_point, unload_length, true)) {
114
     wait_for_filament_reload(beep_count);
117
     wait_for_filament_reload(beep_count);
115
-    resume_print(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, beep_count);
118
+    resume_print(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, beep_count);
116
   }
119
   }
117
 
120
 
118
   #if EXTRUDERS > 1
121
   #if EXTRUDERS > 1

+ 6
- 6
Marlin/src/gcode/feature/pause/M701_M702.cpp 查看文件

60
   // Z axis lift
60
   // Z axis lift
61
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
61
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
62
 
62
 
63
-  // Load filament
64
-  const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
65
-                                                    filament_change_load_length[target_extruder]);
66
-
67
   // Show initial "wait for load" message
63
   // Show initial "wait for load" message
68
   #if ENABLED(ULTIPANEL)
64
   #if ENABLED(ULTIPANEL)
69
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
65
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
80
   if (park_point.z > 0)
76
   if (park_point.z > 0)
81
     do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
77
     do_blocking_move_to_z(min(current_position[Z_AXIS] + park_point.z, Z_MAX_POS), NOZZLE_PARK_Z_FEEDRATE);
82
 
78
 
83
-  load_filament(load_length, ADVANCED_PAUSE_EXTRUDE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS, true,
84
-                thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
79
+  // Load filament
80
+  constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
81
+  const float fast_load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
82
+                                                       : filament_change_load_length[active_extruder]);
83
+  load_filament(slow_load_length, fast_load_length, ADVANCED_PAUSE_PURGE_LENGTH, FILAMENT_CHANGE_ALERT_BEEPS,
84
+                true, thermalManager.wait_for_heating(target_extruder), ADVANCED_PAUSE_MODE_LOAD_FILAMENT);
85
 
85
 
86
   // Restore Z axis
86
   // Restore Z axis
87
   if (park_point.z > 0)
87
   if (park_point.z > 0)

+ 4
- 0
Marlin/src/inc/Conditionals_post.h 查看文件

1048
 #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
1048
 #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
1049
 #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
1049
 #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
1050
 
1050
 
1051
+#if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH)
1052
+  #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
1053
+#endif
1054
+
1051
 /**
1055
 /**
1052
  * Only constrain Z on DELTA / SCARA machines
1056
  * Only constrain Z on DELTA / SCARA machines
1053
  */
1057
  */

+ 11
- 3
Marlin/src/inc/SanityCheck.h 查看文件

133
   #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
133
   #error "FILAMENT_CHANGE_RETRACT_LENGTH is now PAUSE_PARK_RETRACT_LENGTH. Please update your configuration."
134
 #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
134
 #elif defined(FILAMENT_CHANGE_EXTRUDE_FEEDRATE)
135
   #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
135
   #error "FILAMENT_CHANGE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_EXTRUDE_FEEDRATE. Please update your configuration."
136
+#elif defined(ADVANCED_PAUSE_EXTRUDE_FEEDRATE)
137
+  #error "ADVANCED_PAUSE_EXTRUDE_FEEDRATE is now ADVANCED_PAUSE_PURGE_FEEDRATE. Please update your configuration."
136
 #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
138
 #elif defined(FILAMENT_CHANGE_EXTRUDE_LENGTH)
137
-  #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_EXTRUDE_LENGTH. Please update your configuration."
139
+  #error "FILAMENT_CHANGE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
140
+#elif defined(ADVANCED_PAUSE_EXTRUDE_LENGTH)
141
+  #error "ADVANCED_PAUSE_EXTRUDE_LENGTH is now ADVANCED_PAUSE_PURGE_LENGTH. Please update your configuration."
138
 #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
142
 #elif defined(FILAMENT_CHANGE_NOZZLE_TIMEOUT)
139
   #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
143
   #error "FILAMENT_CHANGE_NOZZLE_TIMEOUT is now PAUSE_PARK_NOZZLE_TIMEOUT. Please update your configuration."
140
 #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
144
 #elif defined(FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS)
264
   #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
268
   #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h."
265
 #elif defined(AUTOMATIC_CURRENT_CONTROL)
269
 #elif defined(AUTOMATIC_CURRENT_CONTROL)
266
   #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
270
   #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration."
271
+#elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
272
+  #error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH. Please update your configuration."
267
 #endif
273
 #endif
268
 
274
 
269
 /**
275
 /**
493
     #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
499
     #error "ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE."
494
   #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
500
   #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_UNLOAD_LENGTH > EXTRUDE_MAXLENGTH
495
     #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
501
     #error "FILAMENT_CHANGE_UNLOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
496
-  #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_LOAD_LENGTH > EXTRUDE_MAXLENGTH
497
-    #error "FILAMENT_CHANGE_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
502
+  #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_SLOW_LOAD_LENGTH > EXTRUDE_MAXLENGTH
503
+    #error "FILAMENT_CHANGE_SLOW_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
504
+  #elif ENABLED(PREVENT_LENGTHY_EXTRUDE) && FILAMENT_CHANGE_FAST_LOAD_LENGTH > EXTRUDE_MAXLENGTH
505
+    #error "FILAMENT_CHANGE_FAST_LOAD_LENGTH must be less than or equal to EXTRUDE_MAXLENGTH."
498
   #endif
506
   #endif
499
 #endif
507
 #endif
500
 
508
 

+ 1
- 1
Marlin/src/module/configuration_store.cpp 查看文件

1878
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
1878
   #if ENABLED(ADVANCED_PAUSE_FEATURE)
1879
     for (uint8_t e = 0; e < E_STEPPERS; e++) {
1879
     for (uint8_t e = 0; e < E_STEPPERS; e++) {
1880
       filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH;
1880
       filament_change_unload_length[e] = FILAMENT_CHANGE_UNLOAD_LENGTH;
1881
-      filament_change_load_length[e] = FILAMENT_CHANGE_LOAD_LENGTH;
1881
+      filament_change_load_length[e] = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
1882
     }
1882
     }
1883
   #endif
1883
   #endif
1884
 
1884
 

正在加载...
取消
保存