Semi Automated Pause - Coldpull to change color



  • I do a lot of production and using Pause to change color was always a pain and no use for large productions or non casual prints so this week started to test the idea of using the nice pause.g and resume.g to make the process as painless as possible.

    For this, first I had to find the perfect momento to pause on the gcode. I use Skirt with 12 layers (the same amount of layers for the Pause layer) with 5mm distance and 2 Skirt Outlines (but I suppose for really tall prints it might be better to use 3).

    Then I do a search on the gcode (mind I use S3D) of the last "; skirt" Then I find something like this:

    ; skirt
    G1 X98.056 Y59.801 F10800
    G1 Z2.480 F1500
    G1 E0.0000 F1500
    G92 E0
    G1 X99.094 Y59.554 E0.0355 F4200
    G1 X99.106 Y59.551 E0.0359

    Being that last G1 the beginning of the Skirt Print

    So I ADD the M25 to do a Pause

    ; skirt
    G1 X98.056 Y59.801 F10800
    G1 Z2.480 F1500
    G1 E0.0000 F1500
    G92 E0
    G1 X99.094 Y59.554 E0.0355 F4200
    M25 ; Pause REPEAT Speed of previous line on next so it knows what speed to resume
    G1 X99.106 Y59.551 E0.0359 F4200 ; ADDED F4200 HERE

    Doing this I can be sure that the extruder was on top of the Skirt before doing the pause, so if the filament Strings it won't dirt my print.

    Then the rest it's on the Duet3D macros.

    I edited my pause.g to work like this:

    ; pause.g
    ; called when a print from SD card is paused
    M83 ; relative extruder moves
    G1 E-3 F3600 ; retract 10mm of filament
    G91 ; relative positioning
    G1 Z5 F360 ; lift Z by 5mm
    G90 ; absolute positioning
    G1 X15 Y15 F10000 ; go to X=15 Y=15
    M104 S120 T0 ; Sets to a generic LOW TEMP before calling PLAColdpull Macro
    G1 E5 F1600 ; Keeps pressure FAST Initial recovers from retract also
    M98 Preversecowmilking.g ; Calls the COLDPULL macro

    This is what I do on Resume.g

    ; resume.g
    ; called before a print from SD card is resumed
    M104 S225 T0 ; Sets general Print temp for PLA
    M109 S225 T0 ; Waits until it reaches 225 for PLA
    M83 ; relative extruder moves
    G1 E5 F100 ; Purgues 5mm where it was paused slow to realign gears
    G1 E5 F300 ; Purgues 5mm where it was paused normal
    G1 E-1 F2000 ; retracts 1mm before moving to resumed position
    G1 R1 Z1 F6000 ; go to 5mm above position of the last print move
    G1 R1 ; go back to the last print move
    M83 ; relative extruder moves

    And This is my ReverseCowMilking Macro (automated Coldpull) I add this macro on the SYSTEM area, otherwise I wasn't able to call it but I'm using an old 1.20RC3 version of the firmware so probably just an old bug

    ;reversecowmilking.g
    ; Semi automated coldpull for PLA

    M106 S200 ; SET FANS UP
    G10 P0 R70 S70
    G4 S35 ; Wait 35 secs so the temperature reaches 160-170 if was a 225
    M302 P1 ; ALLOW COLD EXTRUSIONS just in case
    G1 E2 F15 ; Push 2mm slow to keep pressure at semi able temperature
    M116 ; WAIT FOR TEMPERATURES SET TO ARRIVE before continuing
    M106 S0 ; SET FANS OFF

    G4 S5 ; wait for internal temperature to stabilize along filament
    ; starts milking the cow movement

    G1 E-0.3 F100 ; retracts 0.3mm
    G1 E0.1 F2000 ; reajusts 0.1mm - total 0.2
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover & avoid grinding

    G1 E-0.3 F100 ; retracts 0.3mm
    G1 E0.1 F2000 ; reajusts 0.1mm - total 0.4
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover & avoid grinding

    G1 E-0.3 F100 ; retracts 0.3mm
    G1 E0.1 F2000 ; reajusts 0.1mm - total 0.6
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover & avoid grinding

    G1 E-0.3 F100 ; retracts 0.3mm
    G1 E0.1 F2000 ; reajusts 0.1mm - total 0.8 - Enough to dislock filament from hotend
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover & avoid grinding

    G1 E-10 F50 ; retracts 10mm SLOW - To avoid breaking if bond if weak
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover

    G1 E-20 F800 ; retracts 20mm medium speed - Should keep integrity
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover

    G1 E-30 F2000 ; retracts 30mm fast - Should be able
    M18 E0 ; Unlocks feeder
    G4 P500 ; half a sec to allow filament tension to recover

    ;G1 E-30 F2000 ; retracts 30mm
    ;M18 E0 ; Unlocks feeder
    ;G4 P500 ; half a sec to allow filament tension to recover

    M302 P0 ; DONT ALLOW COLD EXTRUSIONS
    M106 R1 ; RESTORE FAN SPEED BEFORE THE PAUSE

    NOTES

    I use directdrive with zge extruder, so the force, speed of the coldpull and timing should be totally different for bowden.

    I release the feeder constantly to allow the filament natural elasticity to go back so I can avoid grinding the filament

    I use Bondtech drivegears, so the filament grip it's perfect at all times.

    Macro comments might not be accurate because I been adjusting this many times until I was able to achieve enough repeatability on my 3 printers.


  • administrators

    @neotko really interesting, I assume you do this to get a sharp colour change with almost nothing of the old filament left in the nozzle? I have seen some of the pictures of the tags you are printing on twitter (maybe report here for general interest?). For those there is no infill to hide the colour change soon assume you get a complete change in the 10mm of purge you do on the resume?



  • I forgot to post the video showing how it works

    https://twitter.com/neotko/status/1048886841599037440

    Indeed my main use for this it's to launch prints and when I get back be ready to just pull the filament and insert a new one without the need to purge, hot, cold, coldpull one by one. So when I get back to the printer I can be sure (so far only failed once of 24 times) that when I need to resume the print I will waste as little time as possible doing manual operations.

    When I insert a new filament I do a purge but just to be sure the filament sticks to the bed instead of staying on the nozzle, since it's directdrive I could avoid the purge, but anyhow I need to be sure that the new filament goes through the hot zone, so it's hard to avoid that part.

    The other reason to do this and not just purge, let's say, 50-80mm of new color to get the new color, it's that in my experience without a coldpull you don't really remove the previous color fully, and I work with many pastel colors where a small spot can ruin the whole print.



  • I have a macro to change filamento mid print unloading and loading again using gcode while paused. Works like a charm. I insert a M226 in the slicer at the point to change colors, the printer will pause and go to the corner. While paused, I click the macro on the web interface, it will run, eject filament, load another, purge and stop. Then I unpause and it goes back printing.

    The macro (and it's dependencies) are below. They are split because I use the same load/unload macros on normal filament loading and unloading.

    @file macros/Load_and_Unload/Change_Filament_Mid_Print.g

    "M98 P""0:/sys/m_unload_filament.g ; Call macro for the rest of the work"
    "M98 P""0:/sys/m_load_filament.g ; Call macro for the rest of the work"

    ##########################################################################
    @file sys/m_load_filament.g

    ; WARNING: temperature must already be set for the current tool (G10 Snnn)
    ; on the calling routine
    ;
    "M291 P""Please insert filament"" S3 T0 ; Display new message"
    "M291 P""Now loading..."" S0 T0 ; Display new message"
    M913 E40:40 ; set extruders 0 and 1 to low current
    M83 ; Select relative extruder motion
    G1 E-1 F$((E_SPEEDS[FAST]*60)) ; Retract 1mm of filament at 1800mm/min to ensure that it is not flagged as stalled.
    G1 E10 F$((E_SPEEDS[SLOW]*60)) ; Feed 10mm of filament at slow speed
    G1 S1 E$((BOWDEN_LENGHT+100)) F$((E_SPEEDS[FAST]*60)) ; Feed filament at fast speed until detects stall
    M913 E100:100 ; set extruders 0 and 1 to 100% of their normal current
    G1 E50 F$((E_SPEEDS[SLOW]*60)) ; Feed 50mm of filament at slow speed
    G4 P1000 ; Wait one second
    G1 E${FIRMWARE_RETRACTION} F$((E_SPEEDS[FAST]*60)) ; Retract 4mm of filament at fast speed
    M400 ; Wait for the moves to finish
    M82 ; absolute extruder moves
    ;G92 E0 ; reset the extruder counter
    M292 ; Hide the message

    ##########################################################################
    @file sys/m_unload_filament.g

    ; WARNING: temperature must already be set for the current tool (G10 Snnn)
    ; on the calling routine
    ;
    "M98 P""0:/sys/m_beep.g"" ; Warning Beep that your filament is starting to retract!"
    G4 P3000 ; Wait 3 seconds
    "M291 P""Retracting filament..."" S0 T0 ; Display another message"
    M83 ; Select relative extruder motion
    G1 E-50 F$((E_SPEEDS[SLOW]*60)) ; Retract some filament at slow speed
    G1 E-${BOWDEN_LENGHT} F$((E_SPEEDS[FAST]*60)) ; Retract more filament at fast speed
    M82 ; absolute extruder moves
    ;G92 E0 ; reset the extruder counter
    M400 ; Wait for the moves to finish
    M292 ; Hide the message again
    M84 E0:0 ; Turn off extruder drives 1 and 2

    Don't mind the variables, they are used in my duet config generator. You can get the idea doing manual substitution. https://github.com/token47/duetcfgen



  • @token47 You may be interested to know that M600 is now being supported as of 2.02 RC3

    M600: Filament change pause
    This command is supported for compatibility with other firmwares. It behaves like M226 except that if macro file filament-change.g exists in /sys on the SD card, it is run in preference to pause.g.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.