-
Notifications
You must be signed in to change notification settings - Fork 11
/
heatsoak.cfg
55 lines (55 loc) · 2.13 KB
/
heatsoak.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
[gcode_macro HEATSOAK]
#
# HEATSOAK
#
# Use the bed to preheat the chamber; the nozzle is placed just above the
# centre of the bed to act as a proxy for a chamber thermistor.
#
# The bed heats and waits for DELAY minutes at the set temperature. After
# DELAY, the extruder temperature is monitored and the heatsoak doesn't
# complete until after the AMBIENT temperature is "reached" (i.e., when
# the extruder reports it is at AMBIENT).
#
# If you have a chamber thermistor, you can monitor that in the
# TEMPERATURE_WAIT instead.
#
# If you don't want to delay for a set amount of time and just want to wait
# until the AMBIENT temperature is reached, you can set DELAY to 0.
#
description: Preheat the chamber using the bed. BED=105 AMBIENT=40 DELAY=15 (minutes)
gcode:
{% set BED = params.BED|default(105)|float %}
{% set AMBIENT = params.AMBIENT|default(40)|float %}
{% set DELAY = params.DELAY|default(15)|float %}
{% set mid_x = printer.toolhead.axis_maximum.x|float / 2.0 %}
{% set mid_y = printer.toolhead.axis_maximum.y|float / 2.0 %}
STATUS_HEATING
M117 Bed:{BED}C Amb:{AMBIENT}C
M118 Preheating {BED}C for {DELAY} minutes
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED}
HOME_IF_NEEDED
G0 X{mid_x} Y{mid_y} Z0.2 F2000
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={BED}
M300
{% if printer['fan_generic chamber_fan'] %}
SET_FAN_SPEED FAN=chamber_fan SPEED=1
{% endif %}
{% set D_block = DELAY|float / 10.0 %}
{% for i in range(10) %}
{% set D_time = (DELAY|float - D_block * i|float) %}
M117 Waiting {D_time} minutes...
M118 Waiting {D_time} minutes...
G4 P{D_block * 60.0 * 1000.0}
{% endfor %}
M117 Waiting for {AMBIENT}C
M118 Waiting for {AMBIENT}C
TEMPERATURE_WAIT SENSOR="extruder" MINIMUM={AMBIENT}
{% if printer['fan_generic chamber_fan'] %}
SET_FAN_SPEED FAN=chamber_fan SPEED=0
{% endif %}
STATUS_READY
M117 Heatsoak complete.
M118 Heatsoak complete.
UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=60
M300 S440 P1000