-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.cfg
98 lines (87 loc) · 2.62 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
# ################################################# ###################
# MACROS
# ################################################# ###################
[idle_timeout]
gcode:
# A list of G-Code commands to execute on an idle timeout. lake
# docs/Command_Templates.md for G-Code format. The default is to run
# M84
timeout: 10
# Idle time (in seconds) to wait before running the above G code
# commands. The default is 600 seconds.
[gcode_macro Z_SPEED]
gcode:
{% if gcode_move.gcode_position.z == 1 %}
M220 S75
{% elif gcode_move.gcode_position.z == 1.5 %}
M220 S100
{% endif %}
[gcode_macro SHUTDOWN_MACHINE]
gcode:
{action_call_remote_method( " shutdown_machine " )}
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
{% set X = params.X|default(10) %}
{% set Y = params.Y|default(10) %}
{% set E = params.E|default(2) %}
{% set Z = params.Z|default(150) %}
G91
G1E-{E}F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% set E = params.E|default(2) %}
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
M107 ; Turn off fan
G91 ; Relative positioning
G1 Z5 ; raise Z
G90 ; Absolute positioning
G1 X5 Y320 ; Wipe out
[gcode_macro PID_EXTRUDER]
description: PID Tuning for Extruders
gcode:
{% set T = params.T|default(255) %}
PID_CALIBRATE HEATER =extruder TARGET ={T}
[gcode_macro PID_BED]
description: PID Tuning for Bed
gcode:
{% set T = params.T|default(80) %}
PID_CALIBRATE HEATER =heater_bed TARGET ={T}
[gcode_macro BED_LEVEL]
gcode:
G28
BED_SCREWS_ADJUST
[gcode_macro m900]
description: Sets pressure advance.
Usage: M900 [K<advance>] [T<extruder_index>]
gcode:
{% set km = printer["gcode_macro config"] %}
{% if km.pressure_advance_scale > 0.0 %}
{% set extruder = "extruder" ~ params.T|replace('0', '')
if "T" in params else printer.toolhead.extruder %}
{% if 'K' in params %}
SET_PRESSURE_ADVANCE EXTRUDER="{extruder}" ADVANCE="{
params.K|float * km.pressure_advance_scale}"
{% endif %}
{% endif %}
[gcode_macro config]
variable_pressure_advance_scale: -1.0
gcode: