-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsensorless.cfg
83 lines (72 loc) · 2.97 KB
/
sensorless.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
# [gcode_macro _HOME_X]
# gcode:
# # Always use consistent run_current on A/B steppers during 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}
# # Home
# G28 X
# # Move away
# G91
# G1 X-10 F1200
# # Wait just a second… (give StallGuard registers time to clear)
# G4 P1000
# # Set current during print
# SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
# SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
# [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}
# # Home
# G28 Y
# # Move away
# G91
# G1 Y-10 F1200
# # Wait just a second… (give StallGuard registers time to clear)
# G4 P1000
# # Set current during print
# SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
# SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[gcode_macro _HOME_X]
gcode:
# Always use consistent run_current on A/B steppers during sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc5160 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc5160 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 1 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# Home
G28 X
# Move away
G91
G1 X-10 F1200
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
[gcode_macro _HOME_Y]
gcode:
# Set current for sensorless homing
{% set RUN_CURRENT_X = printer.configfile.settings['tmc5160 stepper_x'].run_current|float %}
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc5160 stepper_y'].run_current|float %}
{% set HOME_CURRENT = 1 %}
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
# Home
G28 Y
# Move away
G91
G1 Y-10 F1200
# Wait just a second… (give StallGuard registers time to clear)
G4 P1000
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}