-
Notifications
You must be signed in to change notification settings - Fork 0
/
macro.cfg
127 lines (100 loc) · 3.15 KB
/
macro.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
#####################################################################
# Macros
#####################################################################
[include klicky/klicky-probe.cfg]
[gcode_macro HYDRA_DANCE]
gcode:
G90
G28
G1 Z50 F300
FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VELOCITY=10
FORCE_MOVE STEPPER=stepper_z1 DISTANCE=8 VELOCITY=10
FORCE_MOVE STEPPER=stepper_z2 DISTANCE=12 VELOCITY=10
FORCE_MOVE STEPPER=stepper_z DISTANCE=-5 VELOCITY=10
FORCE_MOVE STEPPER=stepper_z1 DISTANCE=-10 VELOCITY=10
FORCE_MOVE STEPPER=stepper_z2 DISTANCE=-8 VELOCITY=10
HYDRA
[gcode_macro HYDRA]
gcode:
Z_TILT_ADJUST
G1 X125 F20000
G1 Y125 F20000
########################################
############# Start Print ##############
########################################
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP=params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP=params.EXTRUDER_TEMP|default(245)|float %}
################## Homing ##################
G90 (Absolute Coordinates)
M83 (Relative Extrusion)
G28 (Home All Axis)
############# Startup Heating ##############
M104 S150 Hotend idle temp
M140 S{BED_TEMP}
M190 S{BED_TEMP}
################ Z probing #################
ATTACH_PROBE_LOCK
Z_TILT_ADJUST
G28 Z (Not needed with Klicky)
CALIBRATE_Z (if you have auto z setup)
BED_MESH_CALIBRATE
DOCK_PROBE_UNLOCK
BED_MESH_PROFILE LOAD=default
M104 S{EXTRUDER_TEMP}
M109 S{EXTRUDER_TEMP}
# Prime line
PRIME_LINE
########################################
############## End Print ###############
########################################
[gcode_macro END_PRINT]
gcode:
G91
# Retract and wipe out Z
G1 E-.75 Z0.2 F2700
G1 X5 Y5 F3000
# Present print
G1 Z10 F1500
G90
G1 X255 Y250
# Shut things down
M107 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y E ;Disable motors
[gcode_macro PID_EXTRUDER]
description: PID Tune for the Extruder
gcode:
{% set TARGET_TEMP = params.TARGET_TEMP|default(200)|float %}
PID_CALIBRATE HEATER=extruder TARGET={TARGET_TEMP}
TURN_OFF_HEATERS
SAVE_CONFIG
[gcode_macro PID_BED]
description: PID Tune for the Bed
gcode:
{% set TARGET_TEMP = params.TARGET_TEMP|default(60)|float %}
PID_CALIBRATE HEATER=heater_bed TARGET={TARGET_TEMP}
TURN_OFF_HEATERS
SAVE_CONFIG
[gcode_macro _HOME_Y]
gcode:
# Set current for sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 0.7 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
SAVE_GCODE_STATE NAME=STATE_HOME_Y
# Home
G28 Y
# Move away
G91
G1 Y-5 F1200
# Wait just a second… (give StallGuard registers time to clear)
G4 P500
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
RESTORE_GCODE_STATE NAME=STATE_HOME_Y