-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathother_macros.cfg
76 lines (69 loc) · 2.41 KB
/
other_macros.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
[gcode_macro COOLDOWN]
gcode:
M106 S255
TURN_OFF_HEATERS
SET_FAN_SPEED FAN=nevermore SPEED=1
SET_FAN_SPEED FAN=exhaust SPEED=1
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM=70
M107
SET_FAN_SPEED FAN=nevermore SPEED=0
SET_FAN_SPEED FAN=exhaust SPEED=0
[gcode_macro HEAT_SOAK_ABS]
gcode:
SET_FAN_SPEED FAN=nevermore SPEED=1
M106 S255
TEMPERATURE_WAIT SENSOR='temperature_sensor chamber' MINIMUM=30
M107
M117 Chamber at temperature
[gcode_macro HEAT_SOAK_ABS_LITE]
gcode:
SET_FAN_SPEED FAN=nevermore SPEED=1
M140 S110
M106 S255
G28
G90
G0 X100 Y100 Z5 F18000
TEMPERATURE_WAIT SENSOR='temperature_sensor chamber' MINIMUM=30
M107
G0 Z10
M117 Chamber at temperature
# Park above purge bucket
# !!WARNING!! - this is used from START/STOP macros, do NOT lower Z!
[gcode_macro GOTO_PURGE_BUCKET_XY]
gcode:
SAVE_GCODE_STATE NAME=__goto__purge
G90
G0 X15 Y302 F18000
RESTORE_GCODE_STATE NAME=__goto__purge
# Start checking the HE fan 1sec after the printer is ready
[delayed_gcode CHECK_ALL_FANS]
initial_duration: 1
gcode:
UPDATE_DELAYED_GCODE ID=CHECK_ALL_FANS DURATION=3
HOTEND_FAN_CHECK
[gcode_macro HOTEND_FAN_CHECK]
variable_he_stop_count: 0
gcode:
{% set min_rpm = 3000|float %}
{% set max_consecutive_stops = 3 %}
{% set rpm = printer['heater_fan hotend_fan'].rpm|float %}
{% set he_target = printer[printer.toolhead.extruder].target|float %}
{% set he_temp = printer[printer.toolhead.extruder].temperature|float %}
{% set fan_on_temp = printer.configfile.settings['heater_fan hotend_fan'].heater_temp|float %}
{% set he_stop_count = printer["gcode_macro HOTEND_FAN_CHECK"].he_stop_count|int %}
{% if (he_target >= fan_on_temp) and (rpm < min_rpm) and (he_temp >= fan_on_temp) %}
SET_GCODE_VARIABLE MACRO=HOTEND_FAN_CHECK VARIABLE=he_stop_count VALUE={he_stop_count + 1}
M118 WARNING: Fan stoppage detected ({he_stop_count+1}/{max_consecutive_stops}).
M400
{% if printer["gcode_macro HOTEND_FAN_CHECK"].he_stop_count|int >= max_consecutive_stops-1 %}
FAN_STOPPAGE_ROUTINE
{% endif %}
{% else %}
SET_GCODE_VARIABLE MACRO=HOTEND_FAN_CHECK VARIABLE=he_stop_count VALUE=0
{% endif %}
[gcode_macro FAN_STOPPAGE_ROUTINE]
gcode:
M117 !!FAN BLOCKED!!
M118 FAN STOPPAGE DETECTED. PAUSING...
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0
PAUSE