Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wanhao i3 Plus Gcode
; Reference - https://www.mpselectmini.com/starting_ending_g-code_scripts
M400 ; wait for pending commands to finish
M104 S0 ; turn off hotend/extruder heater
M140 S0 ; turn off bed heater
G91 ; set to relative positioning
G1 E-2 F300 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z1 ; raise Z 1mm from current position
G1 E-2 F300 ; retract filament even more
G90 ; set to absolute positioning
G1 X20 ; move X axis close to tower but hopefully far enough to keep the fan from rattling
G1 Y120 ; move bed forward for easier part removal
M84 ; disable motors
; Reference - https://www.mpselectmini.com/starting_ending_g-code_scripts
G90 ; set to absolute positioning - this line was added in case Cura doesn't include it by default
M82 ; set extruder to absolute mode - this line was added in case Cura doesn't include it by default (may not be needed)
G28 ; home all axes
; The lines below are to prep the nozzle before a print begins
G1 Z0.2 F1200 ; raise nozzle 0.2mm
G92 E0 ; reset extrusion distance
G1 Y10 ; move Y-Axis (bed) 10mm to prep for purge
G1 X100 E12 F600 ; move X-carriage 100mm while purging 12mm of filament
G92 E0 ; reset extrusion distance
;End GCode
M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+3 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more
G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
;G1 Y125 F5000 ;move completed part out
M84 ;steppers off
G90 ;absolute positioning
;{profile_string}
;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
;M109 S{print_temperature} ;Uncomment to add your own temperature line
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15.0 F{travel_speed} ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E1 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 F{travel_speed}
;Put printing message on LCD screen
M117 Printing...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment