Browse Source

* Auto filament change on CHANGEFILAMENT feature. Now you can activate this option that extrude filament until you press the button.

paclema 10 years ago
parent
commit
8d295547be
2 changed files with 18 additions and 4 deletions
  1. 3
    0
      Marlin/Configuration_adv.h
  2. 15
    4
      Marlin/Marlin_main.cpp

+ 3
- 0
Marlin/Configuration_adv.h View File

@@ -446,6 +446,9 @@ const unsigned int dropsegments=5; //everything with less than this number of st
446 446
     #define FILAMENTCHANGE_ZADD 10
447 447
     #define FILAMENTCHANGE_FIRSTRETRACT -2
448 448
     #define FILAMENTCHANGE_FINALRETRACT -100
449
+    #define AUTO_FILAMENT_CHANGE                //This extrude filament until you press the button on LCD
450
+    #define AUTO_FILAMENT_CHANGE_LENGTH 0.04    //Extrusion length on automatic extrusion loop
451
+    #define AUTO_FILAMENT_CHANGE_FEEDRATE 300   //Extrusion feedrate (mm/min) on automatic extrusion loop
449 452
   #endif
450 453
 #endif
451 454
 

+ 15
- 4
Marlin/Marlin_main.cpp View File

@@ -4958,12 +4958,23 @@ inline void gcode_M503() {
4958 4958
     LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
4959 4959
     uint8_t cnt = 0;
4960 4960
     while (!lcd_clicked()) {
4961
-      if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked
4962
-      manage_heater();
4963
-      manage_inactivity(true);
4964
-      lcd_update();
4961
+      #ifndef AUTO_FILAMENT_CHANGE
4962
+        if (++cnt == 0) lcd_quick_feedback(); // every 256th frame till the lcd is clicked
4963
+        manage_heater();
4964
+        manage_inactivity(true);
4965
+        lcd_update();
4966
+      #else
4967
+        current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
4968
+        plan_buffer_line(target[X_AXIS],target[Y_AXIS],target[Z_MAX_ENDSTOP_INVERTING],current_position[E_AXIS],AUTO_FILAMENT_CHANGE_FEEDRATE/60,active_extruder);
4969
+        st_synchronize();
4970
+      #endif
4965 4971
     } // while(!lcd_clicked)
4966 4972
 
4973
+    #ifdef AUTO_FILAMENT_CHANGE
4974
+      current_position[E_AXIS]= 0;
4975
+      st_synchronize();
4976
+    #endif
4977
+          
4967 4978
     //return to normal
4968 4979
     if (code_seen('L')) target[E_AXIS] -= code_value();
4969 4980
     #ifdef FILAMENTCHANGE_FINALRETRACT

Loading…
Cancel
Save