-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathprint_start.cfg
46 lines (39 loc) · 1.87 KB
/
print_start.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
[gcode_macro START_PRINT]
description:
"G-code to run at the start of a print.
Replace your slicer's start G-code with this.
Check the README for more details on usage.
@param {int} [HOTEND=200] - The target hotend temp
@param {int} [BED=60] - The target bed temp
@param {bool} [RELATIVE_E_MODE=false] - Whether the extruder should be in relative mode
@param {bool} [PROBE=false] - Whether or not to build a new bed mesh
@param {int,int} [PROBE_AREA_START=min,min] - Start of area to probe
@param {int,int} [PROBE_AREA_END=max,max] - End of area to probe"
gcode:
{% set hotend_temp = params.HOTEND|default(200)|int %}
{% set bed_temp = params.BED|default(60)|int %}
{% set relative_extruder = params.RELATIVE_E_MODE|default(false)|string %}
{% set probe = params.PROBE|default(false)|string %}
{% set probe_area_start = params.PROBE_AREA_START|default(printer.toolhead.axis_minimum.x,printer.toolhead.axis_minimum.y)|string %}
{% set probe_area_end = params.PROBE_AREA_END|default(printer.toolhead.axis_maximum.x,printer.toolhead.axis_maximum.y)|string %}
POWER_ON_PRINTER ;ensure the printer is on
G90 ;Absolute positioning
M220 S100 ;Reset feedrate
M221 S100 ;Reset flowrate
{% if relative_extruder|lower == 'true' %}
M83 ;Set extruder to relative mode
{% else %}
M82 ;Set extruder to absolute mode
{% endif %}
M140 S{bed_temp} ;Start heating bed
M190 S{bed_temp} ;Wait for bed to reach temp target
# SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp}
M104 S{hotend_temp * 0.75} T0 ;Start heating hotend, but don't wait
G28 ;Home
{% if probe|lower == 'true' %}
# G29 ;Automatic Bed Tram
BED_MESH_CALIBRATE PROFILE=minimal AREA_START={probe_area_start} AREA_END={probe_area_end}
{% endif %}
M109 S{hotend_temp} T0 ;Finish heating hotend
# SET_HEATER_TEMPERATURE HEATER=extruder TARGET={hotend_temp}
NOZZLE_PRIME_LINE