-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.cfg
69 lines (65 loc) · 1.65 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
[gcode_macro MOTORS_OFF]
gcode:
M18
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90 E0
# Reset the G-Code Z offset (adjust Z offset if needed)
# SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
# Play chime to indicate print starting
M300 P250
# Reset Extruder
G92 E0
# Move Z Axis up
G1 Z2.0 F3000
# Move to start position
G1 X2.1 Y20 Z0.28 F5000.0
# Draw the first line
G1 X2.1 Y200.0 Z0.28 F1500.0 E15
# Move to side a little
G1 X2.4 Y200.0 Z0.28 F5000.0
# Draw the second line
G1 X2.4 Y20 Z0.28 F1500.0 E30
# Reset Extruder
G92 E0
# Move Z Axis up
G1 Z2.0 F3000
[gcode_macro END_PRINT]
gcode:
#Get Printer built volume dimensions
{% set X_MAX = printer.toolhead.axis_maximum.x|default(100)|float %}
{% set Y_MAX = printer.toolhead.axis_maximum.y|default(100)|float %}
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Relative positionning
G91
# Retract and raise Z
G1 Z0.2 E-2 F2400
# Wipe out
G1 X5 Y5 F3000
# Raise Z more
G1 Z10
# Absolute positionning
G90
# Present print
#G1 X{X_MAX / 2} Y{Y_MAX} F6000
G1 Y{Y_MAX} F6000
# Disable steppers
M84