-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.cfg
81 lines (67 loc) · 3.33 KB
/
macros.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[gcode_macro PRINT_START]
gcode:
# This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer.
{% set target_bed = params.BED|int %}
{% set target_extruder = params.EXTRUDER|int %}
{% set target_chamber = params.CHAMBER|default("40")|int %}
{% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
{% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}
# Homes the printer, sets absolute positioning and updates the Stealthburner leds.
G28 # Full home (XYZ)
G90 # Absolut position
## Uncomment for bed mesh (1 of 2)
BED_MESH_CLEAR # Clears old saved bed mesh (if any)
# Checks if the bed temp is higher than 90c - if so then trigger a heatsoak.
{% if params.BED|int > 90 %}
M106 S255 # Turns on the PT-fan
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M190 S{target_bed} # Sets the target temp for the bed
# If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak
{% else %}
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M190 S{target_bed} # Sets the target temp for the bed
G4 P100000 # Waits 5 min for the bedtemp to stabilize
{% endif %}
# Heating nozzle to 150 degrees. This helps with getting a correct Z-home
M109 S150 # Heats the nozzle to 150c
bed_mesh_calibrate # Starts bed mesh
# Heats up the nozzle up to target via data from slicer
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M107 # Turns off partcooling fan
M109 S{target_extruder} # Heats the nozzle to printing temp
# Gets ready to print by doing a purge line and updating the SB-leds
G0 X{x_wait - 50} Y4 F10000 # Moves to starting point
G0 Z0.4 # Raises Z to 0.4
G91 # Incremental positioning
G1 X100 E20 F1000 # Purge line
G90 # Absolut position
[gcode_macro END_PRINT]
gcode:
M400 ; Wait for current moves to finish
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F2400 E-1 ; Retract filament 3mm at 40mm/s to prevent stringing
G0 F5000 Z20 ; Move Z Axis up 20mm to allow filament ooze freely
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
G90 ; absolute pos
G1 X5 Y200 F3000 ;clear head and bring bed to the front
# Disable steppers
M84 ; Disable stepper motors
[delayed_gcode startup_gcode]
initial_duration: 0.1
gcode:
G28
#[gcode_macro POWER_OFF_PRINTER]
#gcode:
# {action_call_remote_method(
# "set_device_power", device="printer", state="off"
# )}
#[gcode_macro POWER_ON_PRINTER]
#gcode:
# {action_call_remote_method(
# "set_device_power", device="printer", state="on"
# )}