Skip to content

Commit cc96e40

Browse files
committed
Add M400s to resolve sensorless homing error in issue AndrewEllis93#66, add comments, formatting changes
1 parent 39116f2 commit cc96e40

File tree

2 files changed

+59
-58
lines changed

2 files changed

+59
-58
lines changed

macros/TEST_SPEED.cfg

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ gcode:
4141
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
4242

4343
# Home and get position for comparison later:
44+
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
4445
G28
4546
# QGL if not already QGLd (only if QGL section exists in config)
4647
{% if printer.configfile.settings.quad_gantry_level %}
@@ -52,6 +53,7 @@ gcode:
5253
# Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24)
5354
G90
5455
G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60}
56+
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
5557
G28 X Y
5658
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
5759
G4 P1000
@@ -64,42 +66,41 @@ gcode:
6466
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
6567

6668
{% for i in range(iterations) %}
67-
# Large pattern
68-
# Diagonals
69-
G0 X{x_min} Y{y_min} F{speed*60}
70-
G0 X{x_max} Y{y_max} F{speed*60}
71-
G0 X{x_min} Y{y_min} F{speed*60}
72-
G0 X{x_max} Y{y_min} F{speed*60}
73-
G0 X{x_min} Y{y_max} F{speed*60}
74-
G0 X{x_max} Y{y_min} F{speed*60}
75-
76-
# Box
77-
G0 X{x_min} Y{y_min} F{speed*60}
78-
G0 X{x_min} Y{y_max} F{speed*60}
79-
G0 X{x_max} Y{y_max} F{speed*60}
80-
G0 X{x_max} Y{y_min} F{speed*60}
69+
# Large pattern diagonals
70+
G0 X{x_min} Y{y_min} F{speed*60}
71+
G0 X{x_max} Y{y_max} F{speed*60}
72+
G0 X{x_min} Y{y_min} F{speed*60}
73+
G0 X{x_max} Y{y_min} F{speed*60}
74+
G0 X{x_min} Y{y_max} F{speed*60}
75+
G0 X{x_max} Y{y_min} F{speed*60}
8176

82-
# Small pattern
83-
# Small diagonals
84-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
85-
G0 X{x_center_max} Y{y_center_max} F{speed*60}
86-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
87-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
88-
G0 X{x_center_min} Y{y_center_max} F{speed*60}
89-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
90-
91-
# Small box
92-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
93-
G0 X{x_center_min} Y{y_center_max} F{speed*60}
94-
G0 X{x_center_max} Y{y_center_max} F{speed*60}
95-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
77+
# Large pattern box
78+
G0 X{x_min} Y{y_min} F{speed*60}
79+
G0 X{x_min} Y{y_max} F{speed*60}
80+
G0 X{x_max} Y{y_max} F{speed*60}
81+
G0 X{x_max} Y{y_min} F{speed*60}
82+
83+
# Small pattern diagonals
84+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
85+
G0 X{x_center_max} Y{y_center_max} F{speed*60}
86+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
87+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
88+
G0 X{x_center_min} Y{y_center_max} F{speed*60}
89+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
90+
91+
# Small patternbox
92+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
93+
G0 X{x_center_min} Y{y_center_max} F{speed*60}
94+
G0 X{x_center_max} Y{y_center_max} F{speed*60}
95+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
9696
{% endfor %}
9797

9898
# Restore max speed/accel/accel_to_decel to their configured values
9999
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
100100

101101
# Re-home and get position again for comparison:
102-
G28
102+
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
103+
G28 # This is a full G28 to fix an issue with CoreXZ - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/12
103104
# Go to XY home positions (in case your homing override leaves it elsewhere)
104105
G90
105106
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}

macros/TEST_SPEED_DELTA.cfg

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ gcode:
4141
{ action_respond_info("TEST_SPEED_DELTA: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
4242

4343
# Home and get position for comparison later:
44+
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
4445
G28
4546
G90
4647
G4 P1000
@@ -53,42 +54,41 @@ gcode:
5354
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
5455

5556
{% for i in range(iterations) %}
56-
# Large pattern
57-
# Diagonals
58-
G0 X{x_min} Y{y_min} F{speed*60}
59-
G0 X{x_max} Y{y_max} F{speed*60}
60-
G0 X{x_min} Y{y_min} F{speed*60}
61-
G0 X{x_max} Y{y_min} F{speed*60}
62-
G0 X{x_min} Y{y_max} F{speed*60}
63-
G0 X{x_max} Y{y_min} F{speed*60}
64-
65-
# Box
66-
G0 X{x_min} Y{y_min} F{speed*60}
67-
G0 X{x_min} Y{y_max} F{speed*60}
68-
G0 X{x_max} Y{y_max} F{speed*60}
69-
G0 X{x_max} Y{y_min} F{speed*60}
57+
# Large pattern diagonals
58+
G0 X{x_min} Y{y_min} F{speed*60}
59+
G0 X{x_max} Y{y_max} F{speed*60}
60+
G0 X{x_min} Y{y_min} F{speed*60}
61+
G0 X{x_max} Y{y_min} F{speed*60}
62+
G0 X{x_min} Y{y_max} F{speed*60}
63+
G0 X{x_max} Y{y_min} F{speed*60}
7064

71-
# Small pattern
72-
# Small diagonals
73-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
74-
G0 X{x_center_max} Y{y_center_max} F{speed*60}
75-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
76-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
77-
G0 X{x_center_min} Y{y_center_max} F{speed*60}
78-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
79-
80-
# Small box
81-
G0 X{x_center_min} Y{y_center_min} F{speed*60}
82-
G0 X{x_center_min} Y{y_center_max} F{speed*60}
83-
G0 X{x_center_max} Y{y_center_max} F{speed*60}
84-
G0 X{x_center_max} Y{y_center_min} F{speed*60}
65+
# Large pattern box
66+
G0 X{x_min} Y{y_min} F{speed*60}
67+
G0 X{x_min} Y{y_max} F{speed*60}
68+
G0 X{x_max} Y{y_max} F{speed*60}
69+
G0 X{x_max} Y{y_min} F{speed*60}
70+
71+
# Small pattern diagonals
72+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
73+
G0 X{x_center_max} Y{y_center_max} F{speed*60}
74+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
75+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
76+
G0 X{x_center_min} Y{y_center_max} F{speed*60}
77+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
78+
79+
# Small pattern box
80+
G0 X{x_center_min} Y{y_center_min} F{speed*60}
81+
G0 X{x_center_min} Y{y_center_max} F{speed*60}
82+
G0 X{x_center_max} Y{y_center_max} F{speed*60}
83+
G0 X{x_center_max} Y{y_center_min} F{speed*60}
8584
{% endfor %}
8685

8786
# Restore max speed/accel/accel_to_decel to their configured values
8887
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
8988

9089
# Re-home and get position again for comparison:
91-
G28
90+
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
91+
G28 # This is a full G28 to fix an issue with CoreXZ - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/12
9292
G4 P1000
9393
GET_POSITION
9494

0 commit comments

Comments
 (0)