-
Notifications
You must be signed in to change notification settings - Fork 1
/
macro_start-end.cfg
103 lines (83 loc) · 2.97 KB
/
macro_start-end.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Adds print macros such as start print and end print.
# in cura, as start gcode you can define "START_PRINT" and end gcode "END_PRINT"
######################################################################
# Start Print and End Print
######################################################################
# Replace the slicer's custom start and end g-code scripts with
# START_PRINT and END_PRINT.
[gcode_macro START_PRINT]
gcode:
# Temperature is managed through Cura. Not required in start code.
# {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
# {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
M117 Homing
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
# SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Use the bed mesh
BED_MESH_PROFILE LOAD=default
# Move the nozzle near the bed
G1 X15 Y20 Z5 F6000
# Check the bed levelness - if it is out by more than the MAX_DEVIATION
# cancel the print, and allow it to be adjusted.
M117 Checking bed levels...
# SCREWS_TILT_CALCULATE MAX_DEVIATION=0.1
# M117 Waiting for temperature
# Start bed heating and continue
# M140 S{BED_TEMP}
# {% if printer.heater_bed.temperature < params.BED_TEMP|float*0.85 %}
# M190 S{params.BED_TEMP|float*0.85} # wait till 0.85 of bed temp is reached, then continue
# {% endif %}
# M140 S{BED_TEMP}
# M109 S{EXTRUDER_TEMP}
# M190 S{BED_TEMP}
# Beep to indicate ready to print
START_BEEP
# Prime line
PRIME_LINE
M117 Printing...
[gcode_macro END_PRINT]
gcode:
M117 Done printing :)
# move z up
G91
G1 E-3 Z+10 F3000
# absolute xy
G90
G1 X0 Y300 ;Present print
#disable hotend and heated bed
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
# disable steppers
# M84 X Y E ;Disable all steppers but Z
# BED_MESH_CLEAR
# Beep to indicate ready to print
END_BEEP
# prime the nozzle
[gcode_macro PRIME_LINE]
gcode:
M117 Prime Line
G92 E0 ;Reset Extruder
# move z axis
# G1 Z2.0 F3000 ;Move Z Axis up
# move to prime position
# G1 X20 Y30 Z0.15 F1000.0 ; go outside print area
# G1 E2 F1000 ; de-retract and push ooze
# G1 X20.0 E6 F1000.0 ; fat 20mm intro line @ 0.30
# G1 X60.0 E3.2 F1000.0 ; thin +40mm intro line @ 0.08
# G1 X100.0 E6 F1000.0 ; fat +40mm intro line @ 0.15
# G1 E-0.8 F3000; retract to avoid stringing
# G1 X99.5 E0 F1000.0 ; -0.5mm wipe action to avoid string
# G1 X110.0 E0 F1000.0 ; +10mm intro line @ 0.00
# G1 E0.6 F1500; de-retract
# G92 E0.0 ; reset extrusion distance
G1 X20 Y30 Z0.28 F5000.0 ;Move to start position
G1 X20 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X22 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X22 Y50 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up