-
Notifications
You must be signed in to change notification settings - Fork 0
/
CR6.cfg
276 lines (250 loc) · 9.54 KB
/
CR6.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# Creality CR-6 SE specific configuration
# The START_PRINT and END_PRINT macro's are called in the slicer start code
# Slicer start code: start_print HOTEND_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}
# Slicer end code: end_print
# The end_print sets the part fan to maximum to speed up cooling of the hotend and waits for the hotend and bed to cool below 50 °C.
# The end print macro can switch off the printer, this part is commented out as the RPI_MCU needs to be implemneted first.
[bed_mesh]
speed: 150 #default 100
horizontal_move_z: 3
mesh_min: 5,5
mesh_max: 230,230
probe_count: 6,6 # 6*6 = 36 probe points
fade_start: 1
fade_end: 10
fade_target: 0
[safe_z_home]
home_xy_position: 117.5,117.5 #Center
z_hop: 10
[force_move]
enable_force_move: True
[gcode_macro TARE_PROBE]
gcode:
M104 S0
SET_PIN PIN=probe_tare VALUE=0
G4 P250
SET_PIN PIN=probe_tare VALUE=1
G4 P250
{action_respond_info("Probe tared")}
[gcode_macro BED_LEVEL]
description: Run Auto Level
gcode:
M118 Starting ABL
M190 S60
G28
M104 S0 #switch off heater as it was switched on after homing
M118 Starting probing
BED_MESH_CALIBRATE
SAVE_CONFIG
M140 S0
M104 S0
M118 FINISHED: Auto Level
[gcode_macro START_PRINT]
# put the following in the Cura start code and remove everything else:
#start_print HOTEND_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}
gcode:
{% set toolTemp = params.HOTEND_TEMP|int %}
#{% set toolTemp = 205 %}
{% set bedTemp = params.BED_TEMP|int %}
SET_GCODE_OFFSET Z=0
{% if toolTemp >= 221 %}
SET_GCODE_OFFSET Z=0.03
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bedTemp}
#SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={toolTemp -40}
G92 E0 #Reset Extruder
M82 # absolute extrusion mode
M220 S100 # Reset Feedrate
M221 S100 # Reset Flowrate
SET_VELOCITY_LIMIT VELOCITY=200 ACCEL=1500 ACCEL_TO_DECEL=750 SQUARE_CORNER_VELOCITY=5
#home all axis and leave printhead in center of the bed for quick Z homing once the bed is 15 degrees below its target
G28
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={toolTemp -40}
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp -10} # wait for bed to be over 50
#TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=50 # wait for bed to be over 50
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp -40}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0 #Set extruder to 0C to avoid interfering with homing
G28 Z # home all axes
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={toolTemp -40}
#SET_HEATER_TEMPERATURE HEATER=extruder TARGET=205
#move to the side, wait untill the bed is within 10 deg from target heat the hotend
G90
G0 Z24
G0 X0 Y0
#M118 Loading Mesh
BED_MESH_PROFILE LOAD="default"
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp}
M118 Giving bed 10 seconds...
G4 P10000 #Wait extra 20 seconds to allow bed to heat well
M118 Setting hotend to +3 degrees to start
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={toolTemp} #Start temp
{% if toolTemp < 205 %}
M118 Printing Temp below 205. Retracting at 170
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=170 #Wait until extruder temp is 170 to retract a bit (default minumum temp Klipper will alow)
{% else %}
M118 Printing Temp 205 or above. Retracting at {toolTemp -35}
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp -35} #Wait until extruder temp is 30 degrees below printing temp to retract a bit
{% endif %}
G1 E-0.5 F2700 #Retract a bit
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp - 3} #start printing shortly before nozzle hits temp to reduce oozing
#M118 Extra 8 sec for hotend to melt
#G4 P8000 #winter time extra time for stuff to melt in hotend
#M118 Waiting for nozzle...
#G4 P5000 #Wait 5 seconds for nozzle to stabilize temp
#TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60
#SET_HEATER_TEMPERATURE HEATER=extruder TARGET=205
#TEMPERATURE_WAIT SENSOR=extruder MINIMUM=203 #start printing 1 deg before reaching setpoint
# And we can now draw our purge line
G92 E0 #Reset Extruder
G1 Z2.0 F3000 #Move Z Axis up
G1 X0 Y20 Z0.28 #Move to start position
G1 X0 Y200.0 Z0.28 E15 #Draw the first line
G1 X0 Y200.0 Z0.28 #Move to side a little
G1 X0.5 Y20 Z0.28 E30 #Draw the second line
# G1 E-0.1 F2700 #Retract a bit
G92 E0 #Reset Extruder
G1 Z3.0 F3000 #Move Z Axis up
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp}
M118 Print Start...
[gcode_macro END_PRINT]
# Put the following in the Cura end code and remove everything else:
# end_print
gcode:
M118 Print Finished
TURN_OFF_HEATERS
M106 S255 ;full fan
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
M118 Moving Print Head
G1 X5 Y5 F5000 ;Wipe out to X5 and Y5 position
G1 Z25 ;Raise Z more
G90 ;Absolute positioning
G1 X0 Y225 ;Present print
G91 ;Relative positioning
G4 P10000 ; milliseconds 1 seconds == 1000 milliseconds
G1 E-10 F2700 ; retract 10mm more after cooling for 10 seconds
#G4 S10
#G1 E-1 F2700 ; retract a bit more after cooling for 15 seconds about 10 degrees
G90 ;Absolute positioning
M84 X Y E ;Disable all steppers but Z
M82 ;absolute extrusion mode
M118 Waiting for bed cooldown below 55C
TEMPERATURE_WAIT SENSOR=heater_bed MAXIMUM=55
M118 Waiting for extruder cooldown below 100C
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM=100
G92 E0 #Reset Extruder
M106 S0 ;Turn-off fan
# POWER_OFF_PRINTER
# [gcode_macro POWER_OFF_PRINTER]
# gcode:
# {action_call_remote_method("set_device_power", device="printer", state="off")}
[gcode_macro LOAD_PLA]
gcode:
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=210
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=205
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < 60.0 %}
G0 Z60
{% endif %}
M106 S255 ;full fan
M83 ; set extruder to relative
m118 Pushing through filament...
G1 E70 F200 ; quickly load filament set for direct drive, for bowden set to E280
TURN_OFF_HEATERS
G4 S20
G1 E-4 F500 ; retract a bit
#G1 E-1 F5 ; retract a bit
M82 ; set extruder to absolute
M106 S0 ;Turn-off fan
M118 Filament Load Finished
[gcode_macro LOAD_PETG]
gcode:
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=230
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=225
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < 50.0 %}
G0 Z50
{% endif %}
M106 S255 ;full fan
M83 ; set extruder to relative
G1 E70 F200 ; quickly load filament set for direct drive, for bowden set to E280
TURN_OFF_HEATERS
G4 S20
G1 E-4 F500 ; retract a bit
#G1 E-1 F5 ; retract a bit
M82 ; set extruder to absolute
M106 S0 ;Turn-off fan
M118 Filament Load Finished
[gcode_macro PID_tune]
gcode:
M118 Will tune hotend and bed
M118 Tuning Hotend to 205C
PID_CALIBRATE HEATER=extruder TARGET=205
M118 Hotend tune finished
M118 Tuning bed to 60C
PID_CALIBRATE HEATER=heater_bed TARGET=60
M118 PID tuning is DONE
SAVE_CONFIG
[gcode_macro UNLOAD_FILAMENT]
gcode:
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < 30.0 %}
G0 Z30
{% endif %}
M83 ; set extruder to relative
G1 E5 F300 ; extrude a little to soften tip
G1 E-380 F1000 ; retract filament completely, set to E380 for Bowden
M82 ; set extruder to absolute
TURN_OFF_HEATERS
[gcode_macro Hotend_Cleaning]
gcode:
M83 ; set extruder to relative
G1 E280 F1000 ; quickly load filament set for direct drive, for bowden set to E280
G1 E30 F300 ; slower extrusion for hotend path
G1 E50 F150 ; prime nozzle with filament
G1 E-380 F1000 ; retract filament completely, set to E380 for Bowden
M82 ; set extruder to absolute
[gcode_macro M204]
description: Set Starting Acceleration
rename_existing: M204.1
gcode:
{% if params.S is defined %}
{% set s = params.S|float %}
SET_VELOCITY_LIMIT ACCEL={s} ACCEL_TO_DECEL={s/2}
{% endif %}
######################################################################
# Filament Change
######################################################################
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[pause_resume]
[gcode_macro M600]
description: Pause the print, resume with resume button.
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
[gcode_macro M900]
description: Set linear Advance for example 0.5
gcode:
{% if params.K is defined %}
{% set K = params.K|float %}
SET_PRESSURE_ADVANCE ADVANCE={K}
{% endif %}