Head and Tail gCode [repository]

I thought it would be useful to build a list of head and tail g-code that we work with on our machine.

This can help less experienced users as they can copy-paste, or offer insight on how to come up with their own g-code instructions.

If you have instructions for a machine that is not on the list, it would be great if you can post it.
I will add it to the main topic.

Creality CR10 v3

Head

M140 S60 ; set bed temperature
M190 S60 ;wait until bed temp is met
M104 S190 ;set extruder temperature
M109 S190 ;wait until extruder temp is met
G90 ;absolute positioning
M83     ;E relative
G28 ;home all axis
G21 ; set units to millimeters
G1 Z5 ; lift extruder 5mm
;
;
;Start purge line
G1 F1000 X0 Y0 Z0.4 E0
G1 F1000 X100 Y0 Z0.4 E28.23

Tail

;TAIL INSTRUCTIONS
G1 E-1 ;retract 1mm
M104 S0 ;turn off extruder heater
M140 S0 ;turn off heatbed
G1 Z400 X0 Y0 ; move to top hardware limits
M107 ; turn off fan
M84 ; disable steppers

Prusa MK2S

Head

;optional
M201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations mm/sec^2
M203 X500 Y500 Z12 E120; set maximum feedrates, mm/s
M204 P2000 R1500 T2000 ; sets acceleration (P,T) and retract acceleration
M205 S0 T0 ; sets the minimum extruding and travel feed rate
M204 S2000 T1500 ;  MK2 firmware only supports the old M204 format
;
;temps
M140 S60	;set bed temperature
M190 S60	;wait until bed temperature is met
M104 S205	;set extruder temperature
M109 S205	;wait until extruder temp is met
;
G90		;absolute positioning
M83		;E relative extrusion
G21		; set units to millimiters
G28 W		; home all axis without mesh bed leveling
G80		; mesh bed leveling
;
;;;;purge line
G1 Y-3.0 F1000.0 	; go outside print area
G92 E0.0		; reset extruder cohordinates to 0
G1 X60;0 E0.0 F1000	; intro line
G1 X100  E3.5 F1000	, intro line
G92 E0.0		;reset extruder cohordinate to 0
;

Tail

;;;;;;;TAIL INSTRUCTIONS
G4	;  wait
M104 S0	;  turn off temperature
M140 S0	;  turn off bed
M107	;  turn off fan
G1 Z200 ; move print head up
G1 X0 Y200 F3000; home X axis
M84;   disable stepper motors

WASP 4060 Clay

Head

;;;;;;HEAD INSTRUCTION

G90
M82 ;absolute extrusion
M106 S0
M104 S0 T0
G28 ; home all axes
G92 E0.0000

Tail

;;; TAIL INSTRUCTION

M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G28 ; home all
;M84 ; disable motors

2 Likes

Added Prusa MK2S to the list

Added Wasp 4060 Clay to the list