I have a followup question and an addition. I translated the GCode above to have comments in English, for anyone that was looking for that.
Second, I’m also printing in PETG-CF and would love to have the nozzle wipe, but not purge, every X layers. Maybe every 5 layers or so (to save time on large prints).
Can anyone tell me how to modify this GCODE and where to insert it to make this happen? Has anyone tested this in the past?
; layer num/total_layer_count: {layer_num+1}/[total_layer_count]
; update layer progress
M73 L{layer_num+1}
M991 S0 P{layer_num}
{if layer_num > 0}
;===== wipe nozzle ===============================
M211 S; push soft endstop status
M211 X0 Y0 Z0 ;turn off Z axis endstop
M83
G1 E-1 F300 ;Retract filament
G90
M83
; ===== LIFT 1MM BEFORE TRAVEL MOVES =====
G91
G1 Z1 F30000
G90
; ===== MOVE in XY + LOWER Z =====
G1 X25 Y185 F30000
G1 Z5 F30000 ;Lower nozzle to Z5
; Series of movements to clean the nozzle with the brush:
G1 X28.5 Y175 F30000 ;Move 3.5mm to the right (was X25)
G1 Z0.15 F30000 ;Move deeper in Z (was 0.2)
G1 Y185 F30000
G91 ;relative coordinates
G1 X-30 F30000
G1 Y-2 F30000
G1 X27 F30000
G1 Y1.5 F30000
G1 X-28 F30000
G1 Y-2 F30000
G1 X30 F30000
G1 Y1.5 F30000
G1 X-30 F30000
G90 ;absolute coordinates
M83 ; Relative extrusion mode
G1 Z5 F30000 ;Lift nozzle to Z5
{if (layer_num%10) == 0} ;clean on metal only every 10th layer
G0 X85 Y185 F7000 ;move to exposed steel surface and stop the nozzle
G0 Z-1.01 F10000
G91 ;Relative coordinates mode
; Series of circular motions to clean the nozzle:
G2 I1 J0 X2 Y0 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
G2 I1 J0 X2 F2000
G2 I-0.75 J0 X-1.5 F2000
{endif}
G90 ;absolute coordinates
G1 Z5 F30000 ;Lift nozzle to Z5
; Series of movements to clean the nozzle with the brush in reverse direction:
G1 X4 Y175 F30000 ;approach from the left side
G1 Z0.15 F30000 ;move deeper in Z (was 0.2)
G1 Y185 F30000
G91 ;relative coordinates
G1 X30 F30000
G1 Y-2 F30000
G1 X-27 F30000
G1 Y1.5 F30000
G1 X28 F30000
G1 Y-2 F30000
G1 X-30 F30000
G1 Y1.5 F30000
G1 X30 F30000
G90 ;absolute coordinates
M83
M211 R; pop softend status
G0 Z{layer_z} F10000 ; Return to the current layer Z height
G1 E1 F300 ;Return filament after retraction
;===== wipe nozzle end ===============================
{endif}