Skip to content

Start and Endcode with preheat and purge line

Oliver Köster edited this page Jun 14, 2023 · 1 revision

ATTENTION! - The user michaelnum drew my attention to the fact that Cura has recently set the temperature of the first layer to 0°C and thus the extruder can no longer work on the first layer. Please refer: #471

Startcode (Cura)

 G21                                        ; metric values
 G90                                        ; absolute positioning
 M82                                        ; set extruder to absolute mode
 M107                                       ; start with the fan off
 M190 S{material_bed_temperature_layer_0}   ; preheat and wait for bed
 M109 S{material_print_temperature_layer_0} ; preheat and wait for hotend
 M300 S1000 P500                            ; BEEP heating done
 G28 X0 Y10 Z0                              ; move X/Y to min endstops
 M420 S1                                    ; enable mesh leveling
 G0 Z0.15                                   ; lift nozzle a bit
 G0 X2                                      ; move away from clips
 G92 E0                                     ; zero the extruded length
 G1 Y50 E25 F500                            ; Extrude 25mm of filament in a 5cm line.
 G92 E0                                     ; zero the extruded length again
 G1 E-2 F500                                ; Retract a little
 G1 Y120 F4000                              ; Quickly wipe away from the filament line

Startcode (PrusaSlicer)

 G21                                        ; metric values
 G90                                        ; absolute positioning
 M82                                        ; set extruder to absolute mode
 M107                                       ; start with the fan off
 M190 S[first_layer_bed_temperature]        ; preheat and wait for bed
 M109 S[first_layer_temperature]            ; preheat and wait for hotend
 M300 S1000 P500                            ; BEEP heating done
 G28 X0 Y10 Z0                              ; move X/Y to min endstops
 M420 S1                                    ; enable mesh leveling
 G0 Z0.15                                   ; lift nozzle a bit
 G0 X2                                      ; go away from clips
 G92 E0                                     ; zero the extruded length
 G1 Y50 E25 F500                            ; Extrude 25mm of filament in a 5cm line.
 G92 E0                                     ; zero the extruded length again
 G1 E-2 F500                                ; Retract a little
 G1 Y120 F4000                              ; Quickly wipe away from the filament line

Endcode (Cura/PrusaSlicer)

 M104 S0                                    ; Extruder off
 M140 S0                                    ; Heatbed off
 M107                                       ; Fan off
 G91                                        ; relative positioning
 G1 E-5 F300                                ; retract a little
 G1 Z+10                                    ; lift print head
 G28 X0 Y0                                  ; homing
 G1 Y180 F2000                              ; reset feedrate
 M84                                        ; disable stepper motors
 G90                                        ; absolute positioning
 M300 S440 P200                             ; Make Print Completed Tones
 M300 S660 P250                             ; beep
 M300 S880 P300                             ; beep

For more information about every single Line, please visit https://marlinfw.org/meta/gcode/