Skip to content

Instantly share code, notes, and snippets.

@tonylambiris
Created January 29, 2025 11:39
Show Gist options
  • Save tonylambiris/1e2ca844c0e4b2d5264ddb977f56fb5d to your computer and use it in GitHub Desktop.
Save tonylambiris/1e2ca844c0e4b2d5264ddb977f56fb5d to your computer and use it in GitHub Desktop.
gcode for mriscoc firmware (UBL bed mesh)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Start G-code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
M117 Homing all axes
G28 ; Home all axes
M117 Preheating extruder to 160
M104 S160 ; Preheat extruder to 160
M117 Waiting for bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for bed temperature
M117 Loading UBL
G29 L0 ; Loading UBL
;M117 Tiling mesh (4 points)
;G29 J2 ; Tilt mesh with 4 points
M117 Tiling mesh (9 points)
G29 J3 ; Tilt mesh with 9 points
M117 Activating UBL
G29 A ; Activate UBL
M117 Fading to 10mm
G29 F10.0 ; Fade to 10mm
M117 Resetting extruder
G92 E0 ; Reset extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for extruder temperature
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; End G-Code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
G91 ; Relative positioning
G1 E-2 F2700 ; Retract a bit
G1 E-2 Z0.2 F2400 ; Retract and raise Z
G1 X5 Y5 F3000 ; Wipe out
G1 Z10 ; Raise Z more
G90 ; Absolute positioning
G1 X0 Y{machine_depth} ; Present print
M106 S0 ; Turn-off fan
M104 S0 ; Turn-off hotend
M140 S0 ; Turn-off bed
M84 X Y E ; Disable all steppers but Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment