This repository was archived by the owner on Oct 20, 2023. It is now read-only.
forked from Desuuuu/DGUS-reloaded-Klipper-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter-creality-ender5plus.cfg
397 lines (364 loc) · 8.62 KB
/
printer-creality-ender5plus.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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# This file contains pin mappings for the Creality Ender 5 Plus. To use
# this config, the firmware should be compiled for the AVR atmega2560.
[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^ar3
position_endstop: 360
position_min: 0
position_max: 360
homing_speed: 50
homing_retract_dist: 5
[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: ^ar14
position_endstop: 360
position_min: 0
position_max: 360
homing_speed: 50
homing_retract_dist: 5
[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
rotation_distance: 4
microsteps: 16
full_steps_per_rotation: 200
endstop_pin: probe:z_virtual_endstop
position_min: -0.75
position_max: 410.75
[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
rotation_distance: 34.400
microsteps: 16
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 750.0
max_extrude_only_velocity: 75.0
max_extrude_only_accel: 1000.0
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_extrude_temp: 170
min_temp: 5
max_temp: 275
[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control: pid
pid_Kp: 690.34
pid_Ki: 111.47
pid_Kd: 1068.83
min_temp: 5
max_temp: 140
[fan]
pin: ar9
[mcu]
serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK06VNAB-if00-port0
pin_map: arduino
[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 1500
max_z_velocity: 10
max_z_accel: 100
[bltouch]
sensor_pin: ^ar18
control_pin: ar11
stow_on_each_sample: False
probe_with_touch_mode: True
set_output_mode: 5V
x_offset: -41
y_offset: -8
z_offset: 0
speed: 4.0
samples: 2
sample_retract_dist: 3.0
[safe_z_home]
home_xy_position: 221,188
speed: 80.0
z_hop: 10.0
z_hop_speed: 5.0
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 5, 5
mesh_max: 314, 347
probe_count: 5,5
fade_start: 1
fade_end: 10
[filament_switch_sensor e0_sensor]
switch_pin: ar2
pause_on_runout: False
runout_gcode:
M600
[pause_resume]
[respond]
default_type: echo
[t5uid1]
firmware: dgus_reloaded
machine_name: Ender 5 Plus
volume: 60
brightness: 50
z_min: 0
z_max: 410
[gcode_macro G27]
default_parameter_X: 20
default_parameter_Y: 340
default_parameter_Z: 20
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% else %}
SAVE_GCODE_STATE NAME=G27_state
G91
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
RESTORE_GCODE_STATE NAME=G27_state
{% endif %}
[gcode_macro G29]
default_parameter_T: 0
gcode:
{% if printer.toolhead.status == "Printing" %}
{printer.gcode.action_respond_info("This command cannot be used while printing")}
{% elif printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% else %}
SAVE_GCODE_STATE NAME=G29_state
G90
G1 Z10 F240
{% if T|int > 30 %}
M190 S{T}
{% endif %}
BED_MESH_CALIBRATE
{% if 'S' in params %}
M140 S{S}
{% endif %}
G90
G1 Z10 F240
G1 X150 Y155 F6000
RESTORE_GCODE_STATE NAME=G29_state
{% endif %}
[gcode_macro M204]
rename_existing: M204.1
default_parameter_F: 0.5
gcode:
{% if 'S' in params %}
SET_VELOCITY_LIMIT ACCEL={S} ACCEL_TO_DECEL={ S|float * F|float }
{% else %}
{% if 'P' in params %}
{% if 'T' in params %}
{% if P|int < T|int %}
SET_VELOCITY_LIMIT ACCEL={P} ACCEL_TO_DECEL={ P|float * F|float }
{% else %}
SET_VELOCITY_LIMIT ACCEL={T} ACCEL_TO_DECEL={ T|float * F|float }
{% endif %}
{% else %}
SET_VELOCITY_LIMIT ACCEL={P} ACCEL_TO_DECEL={ P|float * F|float }
{% endif %}
{% elif 'T' in params %}
SET_VELOCITY_LIMIT ACCEL={T} ACCEL_TO_DECEL={ T|float * F|float }
{% endif %}
{% endif %}
[gcode_macro M205]
gcode:
{% if 'X' in params %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={X}
{% elif 'Y' in params %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={Y}
{% endif %}
[gcode_macro M600]
default_parameter_X: 20
default_parameter_Y: 340
default_parameter_Z: 20
default_parameter_E: 570
gcode:
{% if printer.pause_resume.is_paused %}
{printer.gcode.action_respond_info("Already paused")}
{% elif printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% else %}
PAUSE_PARK
M702 U{E}
{% endif %}
[gcode_macro M701]
default_parameter_I: 30
default_parameter_U: 570
default_parameter_P: 30
default_parameter_IF: 180
default_parameter_UF: 360
default_parameter_PF: 180
gcode:
{% if printer.toolhead.status == "Printing" and not printer.pause_resume.is_paused %}
{printer.gcode.action_respond_info("This command cannot be used while printing")}
{% elif printer.extruder.temperature < 170 %}
{printer.gcode.action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=M701_state
M83
{% if I|int > 0 %}
G1 E{I} F{IF}
{% endif %}
G1 E{U} F{UF}
{% if P|int > 0 %}
G1 E{P} F{PF}
{% endif %}
RESTORE_GCODE_STATE NAME=M701_state
{% endif %}
[gcode_macro M702]
default_parameter_P: 8
default_parameter_I: 30
default_parameter_U: 570
default_parameter_PF: 180
default_parameter_IF: 180
default_parameter_UF: 360
gcode:
{% if printer.toolhead.status == "Printing" and not printer.pause_resume.is_paused %}
{printer.gcode.action_respond_info("This command cannot be used while printing")}
{% elif printer.extruder.temperature < 170 %}
{printer.gcode.action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=M702_state
M83
{% if P|int > 0 %}
G1 E{P} F{PF}
{% endif %}
{% if I|int > 0 %}
G1 E-{I} F{IF}
{% endif %}
G1 E-{U} F{UF}
RESTORE_GCODE_STATE NAME=M702_state
{% endif %}
[gcode_macro M900]
gcode:
{% if 'K' in params %}
{% if 'E' in params %}
SET_PRESSURE_ADVANCE EXTRUDER={E} ADVANCE={K}
{% else %}
SET_PRESSURE_ADVANCE ADVANCE={K}
{% endif %}
{% endif %}
[gcode_macro POWEROFF]
gcode:
RESPOND TYPE=command MSG=action:poweroff
[gcode_macro NOTIFY]
gcode:
{% if 'MSG' in params %}
RESPOND TYPE=command MSG="action:notification {MSG}"
{% endif %}
[gcode_macro LAZY_HOME]
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
[gcode_macro RETRACT]
default_parameter_F: 600
gcode:
{% if 'D' in params %}
{% if printer.toolhead.status == "Printing" and not printer.pause_resume.is_paused %}
{printer.gcode.action_respond_info("This command cannot be used while printing")}
{% elif printer.extruder.temperature < 170 %}
{printer.gcode.action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=RETRACT_state
M83
G1 E-{D} F{F}
RESTORE_GCODE_STATE NAME=RETRACT_state
{% endif %}
{% endif %}
[gcode_macro PAUSE_PARK]
default_parameter_X: 20
default_parameter_Y: 340
default_parameter_Z: 20
gcode:
{% if printer.pause_resume.is_paused %}
{printer.gcode.action_respond_info("Already paused")}
{% elif printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% else %}
PAUSE
RETRACT D=3
G27 X{X} Y{Y} Z{Z}
{% endif %}
[gcode_macro PRE_START]
default_parameter_Z: 0.0
default_parameter_WZ: 0.25
default_parameter_WN: 0.4
gcode:
CLEAR_PAUSE
M106 S0
M220 S100
M221 S100
M900 K0
DGUS_PRINT_START
G28
WIPE_LINE Z={WZ} N={WN}
[gcode_macro POST_END]
gcode:
CLEAR_PAUSE
DGUS_PRINT_END
M220 S100
M221 S100
M900 K0
{% if printer.extruder.temperature >= 170 %}
M83
G91
G1 E-2 F2400
G1 E-2 Z5 F2400
{% endif %}
M82
G90
G27
M104 S0
M140 S0
M106 S0
M84 X Y E
SAVE_IF_SET
[gcode_macro WIPE_LINE]
default_parameter_Z: 0.25
default_parameter_N: 0.4
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% elif printer.extruder.temperature < 170 %}
{printer.gcode.action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=WIPE_LINE_state
M82
G90
G92 E0
G1 X10 Y20 Z5 F3000
G1 Z{Z} F3000
G1 X10 Y150 F1500 E10.83
G1 X{ N|float + 10.0 } F5000
G1 Y22 F1500 E21.5
G1 Y20 F5000
RESTORE_GCODE_STATE NAME=WIPE_LINE_state
{% endif %}
[gcode_macro SAVE_AT_END]
variable_save: 0
gcode:
SET_GCODE_VARIABLE MACRO=SAVE_AT_END VARIABLE=save VALUE=1
[gcode_macro SAVE_IF_SET]
gcode:
{% if printer["gcode_macro SAVE_AT_END"].save == 1 %}
SAVE_CONFIG
{% endif %}