-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.cfg
153 lines (136 loc) · 4.19 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[gcode_macro M204]
rename_existing: M204.1
gcode:
{% set f = params.F|default(0.5)|float %}
{% if 'S' in params %}
{% set s = params.S|float %}
SET_VELOCITY_LIMIT ACCEL={s} ACCEL_TO_DECEL={ s * f }
{% else %}
{% if 'P' in params %}
{% set p = params.P|float %}
{% if 'T' in params %}
{% set t = params.T|float %}
{% if p < t %}
SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f }
{% else %}
SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f }
{% endif %}
{% else %}
SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f }
{% endif %}
{% elif 'T' in params %}
{% set t = params.T|float %}
SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f }
{% endif %}
{% endif %}
[gcode_macro START_PRINT]
gcode:
BED_MESH_PROFILE LOAD=default
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M190 S{BED_TEMP}
# Use absolute coordinates
G92 E0
G90
# 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
BED_MESH_PROFILE LOAD=default
G1 X4 Y4 Z50 F3000
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
G1 Z1.0 F3000 # move z up little to prevent scratching of surface
G1 X4 Y20 Z0.3 F5000.0 ; move to start-line position
G1 X4 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
G1 X4 Y200.0 Z0.4 F5000.0 ; move to side a little
G1 X4 Y20 Z0.4 F1500.0 E30 ; draw 2nd line
G92 E0
G90
BED_MESH_PROFILE LOAD=default
SKEW_PROFILE LOAD=sskew
[gcode_macro END_PRINT]
description: Print finish operations
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 %}
#TIMELAPSE_TAKE_FRAME
#Fix-up extruder
G91
G1 E-2 F2700
G1 E-1.5 Z0.2 F2400
G1 X5 Y5 F6000
G1 Z10
G90
#Present print
G1 Z{printer.toolhead.position.z + 10} F600
G1 X{X_MAX / 2} Y{Y_MAX} F6000
M106 S0
M104 S0
M140 S0
#Disable Steppers
M84 X Y E
SET_SKEW CLEAR=1
[gcode_macro LOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(500) %}
G91
G1 E50 F{speed}
G1 E50 F{speed}
G92
[gcode_macro UNLOAD_FILAMENT]
gcode:
{% set speed = params.SPEED|default(500) %}
G91
G1 E-50 F{speed}
G1 E-50 F{speed}
G92
[gcode_macro _USE_INFILL_SQV]
gcode:
{% set svv = printer.save_variables.variables %}
{% set sqv = svv.infill_sqv | default(printer.configfile.settings.printer.square_corner_velocity, true) %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={ sqv }
[gcode_macro _USE_NORMAL_SQV]
gcode:
{% set sqv = printer.configfile.settings.printer.square_corner_velocity %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={ sqv }
[gcode_macro SET_INFILL_SQV]
gcode:
{% set svv = printer.save_variables.variables %}
{% set val = params.SQV|default(svv.infill_sqv|default(printer.configfile.settings.printer.square_corner_velocity, true), true) | int %}
SAVE_VARIABLE VARIABLE=infill_sqv VALUE={val}
[gcode_macro BED_TRAMMING_1]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
M140 S{BED_TEMP}
G28
M190 S{BED_TEMP}
SCREWS_TILT_CALCULATE
[gcode_macro BED_TRAMMING_2]
gcode:
SCREWS_TILT_CALCULATE
[gcode_macro BED_MESH]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
M140 S{BED_TEMP}
G28
M190 S{BED_TEMP}
BED_MESH_CLEAR
BED_MESH_CALIBRATE
TURN_OFF_HEATERS
SAVE_CONFIG
[screws_tilt_adjust]
screw1: 27.75,67.8
screw1_name: front left
screw2: 227.75,67.8
screw2_name: front right
screw3: 227.75,267.8
screw3_name: back right
screw4: 27.75,267.8
speed: 100.0
screw_thread: CW-M5