forked from TypQxQ/Klipper_ToolChanger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
M109.cfg
41 lines (32 loc) · 1.63 KB
/
M109.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
[gcode_macro M109]
rename_existing: M109.1
description: [T<index>] S<temperature> W<Tolerance>]
Waits for all temperatures, or a specified tool or heater's temperature.
This command can be used without any additional parameters.
Without parameters it waits for bed and current extruder.
Tnnn Tool number.
Snnn Temperature
Wnnn Tolerance in degC. Defaults to 1*C. Wait will wait until heater is between set temperature +/- tolerance.
gcode:
{% set newparameters = "" %} # Parameters to be passed to subroutine in new format.
{% if params.T is defined %}
{% set newparameters = newparameters ~ " TOOL=" ~ params.T %} # Set Tool to new parameters.
{% endif %}
{% if params.S is defined %}
{% set newTempParameters = "" %} # Parameters to be passed to subroutines in new format.
# P= Tool number
{% if params.T is defined %}
{% set newTempParameters = newTempParameters ~ " TOOL="~params.T %} # Set heater_standby_temp to new parameters.
{% endif %}
# S= Active temperature
{% if params.S is defined %}
{% set newTempParameters = newTempParameters ~ " ACTV_TMP="~params.S %} # Set heater_active_temp to new parameters.
{% endif %}
SET_TOOL_TEMPERATURE{newTempParameters}
{% endif %}
{% if params.W is defined %}
{% set newparameters = newparameters ~ " TOLERANCE=" ~ params.W %} # Set Tolerance to new parameters.
{% else %}
{% set newparameters = newparameters ~ " TOLERANCE=2" %} # Set Tolerance to default of 2.
{% endif %}
TEMPERATURE_WAIT_WITH_TOLERANCE{newparameters}