Browse Source

✨ M217 G wipe retract length

studiodyne 2 years ago
parent
commit
9e5c143b87

+ 1
- 1
Marlin/Configuration_adv.h View File

2527
     // Longer prime to clean out a SINGLENOZZLE
2527
     // Longer prime to clean out a SINGLENOZZLE
2528
     #define TOOLCHANGE_FS_EXTRA_PRIME          0  // (mm) Extra priming length
2528
     #define TOOLCHANGE_FS_EXTRA_PRIME          0  // (mm) Extra priming length
2529
     #define TOOLCHANGE_FS_PRIME_SPEED    (4.6*60) // (mm/min) Extra priming feedrate
2529
     #define TOOLCHANGE_FS_PRIME_SPEED    (4.6*60) // (mm/min) Extra priming feedrate
2530
-    #define TOOLCHANGE_FS_WIPE_RETRACT         0  // (mm) Retract before cooling for less stringing, better wipe, etc.
2530
+    #define TOOLCHANGE_FS_WIPE_RETRACT         0  // (mm) Cutting retraction out of park, for less stringing, better wipe, etc. Adjust with LCD or M217 G.
2531
 
2531
 
2532
     // Cool after prime to reduce stringing
2532
     // Cool after prime to reduce stringing
2533
     #define TOOLCHANGE_FS_FAN                 -1  // Fan index or -1 to skip
2533
     #define TOOLCHANGE_FS_FAN                 -1  // Fan index or -1 to skip

+ 18
- 12
Marlin/src/gcode/config/M217.cpp View File

43
  *  S[linear]     Swap length
43
  *  S[linear]     Swap length
44
  *  B[linear]     Extra Swap resume length
44
  *  B[linear]     Extra Swap resume length
45
  *  E[linear]     Extra Prime length (as used by M217 Q)
45
  *  E[linear]     Extra Prime length (as used by M217 Q)
46
- *  P[linear/min] Prime speed
46
+ *  G[linear]     Cutting wipe retract length (<=100mm)
47
  *  R[linear/min] Retract speed
47
  *  R[linear/min] Retract speed
48
  *  U[linear/min] UnRetract speed
48
  *  U[linear/min] UnRetract speed
49
+ *  P[linear/min] Prime speed
49
  *  V[linear]     0/1 Enable auto prime first extruder used
50
  *  V[linear]     0/1 Enable auto prime first extruder used
50
  *  W[linear]     0/1 Enable park & Z Raise
51
  *  W[linear]     0/1 Enable park & Z Raise
51
  *  X[linear]     Park X (Requires TOOLCHANGE_PARK)
52
  *  X[linear]     Park X (Requires TOOLCHANGE_PARK)
52
- *  Y[linear]     Park Y (Requires TOOLCHANGE_PARK)
53
+ *  Y[linear]     Park Y (Requires TOOLCHANGE_PARK and NUM_AXES >= 2)
53
  *  I[linear]     Park I (Requires TOOLCHANGE_PARK and NUM_AXES >= 4)
54
  *  I[linear]     Park I (Requires TOOLCHANGE_PARK and NUM_AXES >= 4)
54
  *  J[linear]     Park J (Requires TOOLCHANGE_PARK and NUM_AXES >= 5)
55
  *  J[linear]     Park J (Requires TOOLCHANGE_PARK and NUM_AXES >= 5)
55
  *  K[linear]     Park K (Requires TOOLCHANGE_PARK and NUM_AXES >= 6)
56
  *  K[linear]     Park K (Requires TOOLCHANGE_PARK and NUM_AXES >= 6)
79
     if (parser.seenval('B')) { const float v = parser.value_linear_units(); toolchange_settings.extra_resume = constrain(v, -10, 10); }
80
     if (parser.seenval('B')) { const float v = parser.value_linear_units(); toolchange_settings.extra_resume = constrain(v, -10, 10); }
80
     if (parser.seenval('E')) { const float v = parser.value_linear_units(); toolchange_settings.extra_prime = constrain(v, 0, max_extrude); }
81
     if (parser.seenval('E')) { const float v = parser.value_linear_units(); toolchange_settings.extra_prime = constrain(v, 0, max_extrude); }
81
     if (parser.seenval('P')) { const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
82
     if (parser.seenval('P')) { const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
83
+    if (parser.seenval('G')) { const int16_t v = parser.value_linear_units(); toolchange_settings.wipe_retract = constrain(v, 0, 100); }
82
     if (parser.seenval('R')) { const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
84
     if (parser.seenval('R')) { const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
83
     if (parser.seenval('U')) { const int16_t v = parser.value_linear_units(); toolchange_settings.unretract_speed = constrain(v, 10, 5400); }
85
     if (parser.seenval('U')) { const int16_t v = parser.value_linear_units(); toolchange_settings.unretract_speed = constrain(v, 10, 5400); }
84
     #if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
86
     #if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
164
   SERIAL_ECHOPGM("  M217");
166
   SERIAL_ECHOPGM("  M217");
165
 
167
 
166
   #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
168
   #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
167
-    SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length));
168
-    SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
169
-                     SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
170
-                     SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed));
171
-    SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
172
-                   " U", LINEAR_UNIT(toolchange_settings.unretract_speed),
173
-                   " F", toolchange_settings.fan_speed,
174
-                   " D", toolchange_settings.fan_time);
169
+    SERIAL_ECHOPGM_P(
170
+      PSTR(" S"), LINEAR_UNIT(toolchange_settings.swap_length),
171
+        SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
172
+        SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
173
+        SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed),
174
+      PSTR(" G"), LINEAR_UNIT(toolchange_settings.wipe_retract),
175
+      PSTR(" R"), LINEAR_UNIT(toolchange_settings.retract_speed),
176
+      PSTR(" U"), LINEAR_UNIT(toolchange_settings.unretract_speed),
177
+      PSTR(" F"), toolchange_settings.fan_speed,
178
+      PSTR(" D"), toolchange_settings.fan_time
179
+    );
175
 
180
 
176
     #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
181
     #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
177
-      SERIAL_ECHOPGM(" A", migration.automode);
178
-      SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last));
182
+      SERIAL_ECHOPGM(" A", migration.automode, " L", LINEAR_UNIT(migration.last));
179
     #endif
183
     #endif
180
 
184
 
181
     #if ENABLED(TOOLCHANGE_PARK)
185
     #if ENABLED(TOOLCHANGE_PARK)
186
+    {
182
       SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
187
       SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
183
       SERIAL_ECHOPGM_P(
188
       SERIAL_ECHOPGM_P(
184
             SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)
189
             SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)
196
             )
201
             )
197
         #endif
202
         #endif
198
       );
203
       );
204
+    }
199
     #endif
205
     #endif
200
 
206
 
201
     #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
207
     #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)

+ 1
- 0
Marlin/src/lcd/language/language_en.h View File

510
   LSTR MSG_TOOL_CHANGE                    = _UxGT("Tool Change");
510
   LSTR MSG_TOOL_CHANGE                    = _UxGT("Tool Change");
511
   LSTR MSG_TOOL_CHANGE_ZLIFT              = _UxGT("Z Raise");
511
   LSTR MSG_TOOL_CHANGE_ZLIFT              = _UxGT("Z Raise");
512
   LSTR MSG_SINGLENOZZLE_PRIME_SPEED       = _UxGT("Prime Speed");
512
   LSTR MSG_SINGLENOZZLE_PRIME_SPEED       = _UxGT("Prime Speed");
513
+  LSTR MSG_SINGLENOZZLE_WIPE_RETRACT      = _UxGT("Wipe Retract");
513
   LSTR MSG_SINGLENOZZLE_RETRACT_SPEED     = _UxGT("Retract Speed");
514
   LSTR MSG_SINGLENOZZLE_RETRACT_SPEED     = _UxGT("Retract Speed");
514
   LSTR MSG_FILAMENT_PARK_ENABLED          = _UxGT("Park Head");
515
   LSTR MSG_FILAMENT_PARK_ENABLED          = _UxGT("Park Head");
515
   LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED   = _UxGT("Recover Speed");
516
   LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED   = _UxGT("Recover Speed");

+ 1
- 0
Marlin/src/lcd/language/language_fr.h View File

376
   LSTR MSG_TOOL_CHANGE                    = _UxGT("Changement outil");
376
   LSTR MSG_TOOL_CHANGE                    = _UxGT("Changement outil");
377
   LSTR MSG_TOOL_CHANGE_ZLIFT              = _UxGT("Augmenter Z");
377
   LSTR MSG_TOOL_CHANGE_ZLIFT              = _UxGT("Augmenter Z");
378
   LSTR MSG_SINGLENOZZLE_PRIME_SPEED       = _UxGT("Vitesse primaire");
378
   LSTR MSG_SINGLENOZZLE_PRIME_SPEED       = _UxGT("Vitesse primaire");
379
+  LSTR MSG_SINGLENOZZLE_WIPE_RETRACT      = _UxGT("Purge Retract");
379
   LSTR MSG_SINGLENOZZLE_RETRACT_SPEED     = _UxGT("Vitesse rétract°");
380
   LSTR MSG_SINGLENOZZLE_RETRACT_SPEED     = _UxGT("Vitesse rétract°");
380
   LSTR MSG_FILAMENT_PARK_ENABLED          = _UxGT("Garer Extrudeur");
381
   LSTR MSG_FILAMENT_PARK_ENABLED          = _UxGT("Garer Extrudeur");
381
   LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED   = _UxGT("Vitesse reprise");
382
   LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED   = _UxGT("Vitesse reprise");

+ 1
- 0
Marlin/src/lcd/menu/menu_configuration.cpp View File

124
       EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_UNRETRACT_SPEED, &toolchange_settings.unretract_speed, 10, 5400);
124
       EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_UNRETRACT_SPEED, &toolchange_settings.unretract_speed, 10, 5400);
125
       EDIT_ITEM(float3, MSG_FILAMENT_PURGE_LENGTH, &toolchange_settings.extra_prime, 0, max_extrude);
125
       EDIT_ITEM(float3, MSG_FILAMENT_PURGE_LENGTH, &toolchange_settings.extra_prime, 0, max_extrude);
126
       EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_PRIME_SPEED, &toolchange_settings.prime_speed, 10, 5400);
126
       EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_PRIME_SPEED, &toolchange_settings.prime_speed, 10, 5400);
127
+      EDIT_ITEM_FAST(int4, MSG_SINGLENOZZLE_WIPE_RETRACT, &toolchange_settings.wipe_retract, 0, 100);
127
       EDIT_ITEM_FAST(uint8, MSG_SINGLENOZZLE_FAN_SPEED, &toolchange_settings.fan_speed, 0, 255);
128
       EDIT_ITEM_FAST(uint8, MSG_SINGLENOZZLE_FAN_SPEED, &toolchange_settings.fan_speed, 0, 255);
128
       EDIT_ITEM_FAST(uint8, MSG_SINGLENOZZLE_FAN_TIME, &toolchange_settings.fan_time, 1, 30);
129
       EDIT_ITEM_FAST(uint8, MSG_SINGLENOZZLE_FAN_TIME, &toolchange_settings.fan_time, 1, 30);
129
     #endif
130
     #endif

+ 2
- 1
Marlin/src/module/settings.cpp View File

36
  */
36
  */
37
 
37
 
38
 // Change EEPROM version if the structure changes
38
 // Change EEPROM version if the structure changes
39
-#define EEPROM_VERSION "V86"
39
+#define EEPROM_VERSION "V87"
40
 #define EEPROM_OFFSET 100
40
 #define EEPROM_OFFSET 100
41
 
41
 
42
 // Check the integrity of data offsets.
42
 // Check the integrity of data offsets.
2876
       toolchange_settings.unretract_speed = TOOLCHANGE_FS_UNRETRACT_SPEED;
2876
       toolchange_settings.unretract_speed = TOOLCHANGE_FS_UNRETRACT_SPEED;
2877
       toolchange_settings.extra_prime     = TOOLCHANGE_FS_EXTRA_PRIME;
2877
       toolchange_settings.extra_prime     = TOOLCHANGE_FS_EXTRA_PRIME;
2878
       toolchange_settings.prime_speed     = TOOLCHANGE_FS_PRIME_SPEED;
2878
       toolchange_settings.prime_speed     = TOOLCHANGE_FS_PRIME_SPEED;
2879
+      toolchange_settings.wipe_retract    = TOOLCHANGE_FS_WIPE_RETRACT;
2879
       toolchange_settings.fan_speed       = TOOLCHANGE_FS_FAN_SPEED;
2880
       toolchange_settings.fan_speed       = TOOLCHANGE_FS_FAN_SPEED;
2880
       toolchange_settings.fan_time        = TOOLCHANGE_FS_FAN_TIME;
2881
       toolchange_settings.fan_time        = TOOLCHANGE_FS_FAN_TIME;
2881
     #endif
2882
     #endif

+ 15
- 15
Marlin/src/module/tool_change.cpp View File

940
    * Cutting recovery -- Recover from cutting retraction that occurs at the end of nozzle priming
940
    * Cutting recovery -- Recover from cutting retraction that occurs at the end of nozzle priming
941
    *
941
    *
942
    * If the active_extruder is up to temp (!too_cold):
942
    * If the active_extruder is up to temp (!too_cold):
943
-   *  Extrude filament distance = toolchange_settings.extra_resume + TOOLCHANGE_FS_WIPE_RETRACT
943
+   *  Extrude filament distance = toolchange_settings.extra_resume + toolchange_settings.wipe_retract
944
    *  current_position.e = e;
944
    *  current_position.e = e;
945
    *  sync_plan_position_e();
945
    *  sync_plan_position_e();
946
    */
946
    */
947
   void extruder_cutting_recover(const_float_t e) {
947
   void extruder_cutting_recover(const_float_t e) {
948
     if (!too_cold(active_extruder)) {
948
     if (!too_cold(active_extruder)) {
949
-      const float dist = toolchange_settings.extra_resume + (TOOLCHANGE_FS_WIPE_RETRACT);
949
+      const float dist = toolchange_settings.extra_resume + toolchange_settings.wipe_retract;
950
       FS_DEBUG("Performing Cutting Recover | Distance: ", dist, " | Speed: ", MMM_TO_MMS(toolchange_settings.unretract_speed), "mm/s");
950
       FS_DEBUG("Performing Cutting Recover | Distance: ", dist, " | Speed: ", MMM_TO_MMS(toolchange_settings.unretract_speed), "mm/s");
951
       unscaled_e_move(dist, MMM_TO_MMS(toolchange_settings.unretract_speed));
951
       unscaled_e_move(dist, MMM_TO_MMS(toolchange_settings.unretract_speed));
952
       planner.synchronize();
952
       planner.synchronize();
973
     float fr = toolchange_settings.unretract_speed; // Set default speed for unretract
973
     float fr = toolchange_settings.unretract_speed; // Set default speed for unretract
974
 
974
 
975
     #if ENABLED(TOOLCHANGE_FS_SLOW_FIRST_PRIME)
975
     #if ENABLED(TOOLCHANGE_FS_SLOW_FIRST_PRIME)
976
-    /*
977
-     * Perform first unretract movement at the slower Prime_Speed to avoid breakage on first prime
978
-     */
979
-    static Flags<EXTRUDERS> extruder_did_first_prime;  // Extruders first priming status
980
-    if (!extruder_did_first_prime[active_extruder]) {
981
-      extruder_did_first_prime.set(active_extruder);   // Log first prime complete
982
-      // new nozzle - prime at user-specified speed.
983
-      FS_DEBUG("First time priming T", active_extruder, ", reducing speed from ", MMM_TO_MMS(fr), " to ",  MMM_TO_MMS(toolchange_settings.prime_speed), "mm/s");
984
-      fr = toolchange_settings.prime_speed;
985
-      unscaled_e_move(0, MMM_TO_MMS(fr));      // Init planner with 0 length move
986
-    }
976
+      /**
977
+       * Perform first unretract movement at the slower Prime_Speed to avoid breakage on first prime
978
+       */
979
+      static Flags<EXTRUDERS> extruder_did_first_prime;  // Extruders first priming status
980
+      if (!extruder_did_first_prime[active_extruder]) {
981
+        extruder_did_first_prime.set(active_extruder);   // Log first prime complete
982
+        // new nozzle - prime at user-specified speed.
983
+        FS_DEBUG("First time priming T", active_extruder, ", reducing speed from ", MMM_TO_MMS(fr), " to ",  MMM_TO_MMS(toolchange_settings.prime_speed), "mm/s");
984
+        fr = toolchange_settings.prime_speed;
985
+        unscaled_e_move(0, MMM_TO_MMS(fr));      // Init planner with 0 length move
986
+      }
987
     #endif
987
     #endif
988
 
988
 
989
     //Calculate and perform the priming distance
989
     //Calculate and perform the priming distance
1011
 
1011
 
1012
     // Cutting retraction
1012
     // Cutting retraction
1013
     #if TOOLCHANGE_FS_WIPE_RETRACT
1013
     #if TOOLCHANGE_FS_WIPE_RETRACT
1014
-      FS_DEBUG("Performing Cutting Retraction | Distance: ", -(TOOLCHANGE_FS_WIPE_RETRACT), " | Speed: ", MMM_TO_MMS(toolchange_settings.retract_speed), "mm/s");
1015
-      unscaled_e_move(-(TOOLCHANGE_FS_WIPE_RETRACT), MMM_TO_MMS(toolchange_settings.retract_speed));
1014
+      FS_DEBUG("Performing Cutting Retraction | Distance: ", -toolchange_settings.wipe_retract, " | Speed: ", MMM_TO_MMS(toolchange_settings.retract_speed), "mm/s");
1015
+      unscaled_e_move(-toolchange_settings.wipe_retract, MMM_TO_MMS(toolchange_settings.retract_speed));
1016
     #endif
1016
     #endif
1017
 
1017
 
1018
     // Cool down with fan
1018
     // Cool down with fan

+ 1
- 0
Marlin/src/module/tool_change.h View File

33
       float extra_prime;            // M217 E
33
       float extra_prime;            // M217 E
34
       float extra_resume;           // M217 B
34
       float extra_resume;           // M217 B
35
       int16_t prime_speed;          // M217 P
35
       int16_t prime_speed;          // M217 P
36
+      int16_t wipe_retract;         // M217 G
36
       int16_t retract_speed;        // M217 R
37
       int16_t retract_speed;        // M217 R
37
       int16_t unretract_speed;      // M217 U
38
       int16_t unretract_speed;      // M217 U
38
       uint8_t fan_speed;            // M217 F
39
       uint8_t fan_speed;            // M217 F

Loading…
Cancel
Save