-
Notifications
You must be signed in to change notification settings - Fork 28
/
homing_override.cfg
103 lines (79 loc) · 2.44 KB
/
homing_override.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
[homing_override]
gcode:
# A list of G-Code commands to execute in place of G28 commands
# found in the normal g-code input. See docs/Command_Templates.md
# for G-Code format. If a G28 is contained in this list of commands
# then it will invoke the normal homing procedure for the printer.
# The commands listed here must home all axes. This parameter must
# be provided.
{% set do_x = false %}
{% set do_y = false %}
{% set do_z = false %}
{% if params.X is defined %}
{% set do_x = true %}
{% endif %}
{% if params.Y is defined %}
{% set do_y = true %}
{% endif %}
{% if params.Z is defined %}
{% set do_z = true %}
{% endif %}
{% if do_x == true and do_y == false and do_z == false %}
# Home
G28 X0
# Move away
G90
G1 X30 F1200
{% endif %}
{% if do_y == true and do_x == false and do_z == false %}
# Home
G28 Y0
# Move away
G90
G1 Y30 F1200
{% endif %}
{% if do_z == true and do_x == false and do_y == false %}
G28 Z0
{% endif %}
{% if do_x == true and do_y == true and do_z == false %}
# Home
G28 X0
# Move away
G90
G1 X30 F1200
G4 P2000
# Home
G28 Y0
# Move away
G90
G1 Y30 F1200
{% endif %}
{% if do_x == false and do_y == false and do_z == false %}
# Home
G28 X0
# Move away
G90
G1 X30 F1200
G4 P2000
# Home
G28 Y0
# Move away
G90
G1 Y30 F1200
G4 P1000
G28 Z0
{% endif %}
axes: xyz
# The axes to override. For example, if this is set to "z" then the
# override script will only be run when the z axis is homed (eg, via
# a "G28" or "G28 Z0" command). Note, the override script should
# still home all axes. The default is "xyz" which causes the
# override script to be run in place of all G28 commands.
#set_position_x:
#set_position_y:
#set_position_z:
# If specified, the printer will assume the axis is at the specified
# position prior to running the above g-code commands. Setting this
# disables homing checks for that axis. This may be useful if the
# head must move prior to invoking the normal G28 mechanism for an
# axis. The default is to not force a position for an axis.