-
Notifications
You must be signed in to change notification settings - Fork 9
/
M84.cfg
46 lines (42 loc) · 1.6 KB
/
M84.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
####
# Improved M84 turns of individual axis.
#
# Will work for upto 4 Z steppers automaticly. Intended for use with idle_timeout.cfg
#
###
[gcode_macro M84]
description: Can disable a subset of steppers, M84 X Y E leaves Z enabled. M84 XY (no spaces) is invalid and disables all steppers.
rename_existing: M84.1
gcode:
{% if 'X' in params %}
{action_respond_info("Stepper X turned off")}
SET_STEPPER_ENABLE stepper=stepper_x enable=0
{% endif %}
{% if 'Y' in params %}
{action_respond_info("Stepper Y turned off")}
SET_STEPPER_ENABLE stepper=stepper_y enable=0
{% endif %}
{% if 'E' in params %}
{action_respond_info("Extruder turned off")}
SET_STEPPER_ENABLE stepper=extruder enable=0
{% endif %}
{% if 'Z' in params %}
SET_STEPPER_ENABLE stepper=stepper_z enable=0
{action_respond_info("Stepper Z turned off")}
{% if printer.configfile.settings.stepper_z1 %}
{action_respond_info("Stepper Z1 turned off")}
SET_STEPPER_ENABLE stepper=stepper_z1 enable=0
{% endif %}
{% if printer.configfile.settings.stepper_z2 %}
{action_respond_info("Stepper Z2 turned off")}
SET_STEPPER_ENABLE stepper=stepper_z2 enable=0
{% endif %}
{% if printer.configfile.settings.stepper_z3 %}
{action_respond_info("Stepper Z3 turned off")}
SET_STEPPER_ENABLE stepper=stepper_z3 enable=0
{% endif %}
{% endif %}
{% if 'X' not in params and 'Y' not in params and 'E' not in params and 'Z' not in params%}
{action_respond_info("All steppers turned off")}
M84.1
{% endif %}