- Octopus Pro: Motors (MOTOR0-7), bed heater (PA1), chamber heater (PB10) - Azteeg X3: Thermistors, endstops, probe, fan, hotend heaters - IDEX setup with external DM542T drivers - Includes wiring documentation and swap guide Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
244 lines
7.1 KiB
INI
244 lines
7.1 KiB
INI
|
|
# Cancel print definition
|
|
[gcode_macro CANCEL_PRINT]
|
|
description: Cancel the actual running print
|
|
rename_existing: CANCEL_PRINT_BASE
|
|
gcode:
|
|
PARK_{printer.toolhead.extruder}
|
|
CANCEL_PRINT_BASE
|
|
|
|
#[pause_resume]
|
|
|
|
[gcode_macro PAUSE]
|
|
rename_existing: BASE_PAUSE
|
|
gcode:
|
|
{% set Z = params.Z|default(10)|float %}
|
|
{% set E = params.E|default(1)|float %}
|
|
SAVE_GCODE_STATE NAME=PAUSE_state
|
|
BASE_PAUSE
|
|
G91
|
|
G1 E-{E} F2100
|
|
G1 Z{Z}
|
|
PARK_{printer.toolhead.extruder}
|
|
|
|
[gcode_macro RESUME]
|
|
rename_existing: BASE_RESUME
|
|
gcode:
|
|
{% set E = params.E|default(1)|float %}
|
|
G91
|
|
G1 E{E} F2100
|
|
G90
|
|
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
|
|
BASE_RESUME
|
|
|
|
[gcode_macro END_PRINT]
|
|
gcode:
|
|
{% set Z = params.Z|default(10)|float %}
|
|
{% set E = params.E|default(5)|float %}
|
|
# Turn off bed, extruder, and fan
|
|
; M140 S0
|
|
; M104 T0 S0
|
|
; M104 T1 S0
|
|
M106 S0
|
|
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0
|
|
SET_HEATER_TEMPERATURE HEATER=extruder1 TARGET=0
|
|
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0
|
|
SET_HEATER_TEMPERATURE HEATER=chamber TARGET=0
|
|
G91
|
|
G1 E-{E} F2100
|
|
G1 Z{Z}
|
|
PARK_{printer.toolhead.extruder}
|
|
# Disable steppers
|
|
M84
|
|
|
|
# Homing definition
|
|
[homing_override]
|
|
set_position_z: 10
|
|
gcode:
|
|
SAVE_GCODE_STATE NAME=home_z_state
|
|
G91
|
|
G1 Z10 F480
|
|
G28 X0 Y0
|
|
G28 Z0
|
|
G90
|
|
G1 Z3 F600
|
|
RESTORE_GCODE_STATE NAME=home_z_state
|
|
axes: z
|
|
|
|
# Idle definition
|
|
[idle_timeout]
|
|
#gcode:
|
|
# A list of G-Code commands to execute on an idle timeout. See
|
|
# docs/Command_Templates.md for G-Code format. The default is to run
|
|
# "TURN_OFF_HEATERS" and "M84".
|
|
timeout: 86400 # Allow heaters to run 24 hours lol
|
|
# Idle time (in seconds) to wait before running the above G-Code
|
|
# commands. The default is 600 seconds.
|
|
|
|
# Toolhead definition
|
|
# Primary toolhead
|
|
[gcode_macro PARK_extruder]
|
|
gcode:
|
|
SAVE_GCODE_STATE NAME=park0
|
|
G90
|
|
G1 X-85 F12000
|
|
RESTORE_GCODE_STATE NAME=park0
|
|
|
|
# Activate the primary extruder
|
|
[gcode_macro T0]
|
|
gcode:
|
|
PARK_{printer.toolhead.extruder}
|
|
ACTIVATE_EXTRUDER EXTRUDER=extruder
|
|
SET_DUAL_CARRIAGE CARRIAGE=0
|
|
SET_GCODE_OFFSET Z=0
|
|
#SWITCH_PROBE PROBE_NUM=0
|
|
# Input shaper for carriage 0
|
|
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
|
|
|
|
# Secondary toolhead
|
|
[gcode_macro PARK_extruder1]
|
|
gcode:
|
|
SAVE_GCODE_STATE NAME=park1
|
|
G90
|
|
G1 X518 F12000
|
|
RESTORE_GCODE_STATE NAME=park1
|
|
|
|
[gcode_macro T1]
|
|
gcode:
|
|
PARK_{printer.toolhead.extruder}
|
|
ACTIVATE_EXTRUDER EXTRUDER=extruder1
|
|
SET_DUAL_CARRIAGE CARRIAGE=1
|
|
SET_GCODE_OFFSET Z=-0.45
|
|
#SWITCH_PROBE PROBE_NUM=1
|
|
# Input shaper for carriage 1
|
|
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
|
|
|
|
[gcode_macro CALIBRATE_M2]
|
|
# Macro to calibrate the current tool with a mesh centered at Z=0.
|
|
# Useful if you're using Z fade for dupe mode, or anomalously thick sheets.
|
|
gcode:
|
|
G28
|
|
G1 Z15 F600
|
|
G1 X200 Y200 F6000
|
|
Z_ENDSTOP_CALIBRATE
|
|
PROBE
|
|
TESTZ Z=-.001
|
|
G4 P500
|
|
M400
|
|
ACCEPT
|
|
SET_KINEMATIC_POSITION Z=0
|
|
BED_MESH_CALIBRATE
|
|
|
|
#[gcode_macro SET_HEATER_TEMPERATURE]
|
|
#description: Set heater temperature and save temperature to variables file.
|
|
#rename_existing: SET_HEATER_TEMPERATURE_BASE
|
|
#gcode:
|
|
# {% if params.HEATER=="extruder" %}
|
|
# SAVE_VARIABLE VARIABLE=t0temp VALUE={params.TARGET}
|
|
# {% elif params.HEATER=="extruder1"%}
|
|
# SAVE_VARIABLE VARIABLE=t1temp VALUE={params.TARGET}
|
|
# {% elif params.HEATER=="heater_bed"%}
|
|
# SAVE_VARIABLE VARIABLE=bedtemp VALUE={params.TARGET}
|
|
# {% elif params.HEATER=="chamber"%}
|
|
# SAVE_VARIABLE VARIABLE=chambertemp VALUE={params.TARGET}
|
|
# {% endif%}
|
|
# SET_HEATER_TEMPERATURE_BASE HEATER={params.HEATER} TARGET={params.TARGET}
|
|
|
|
[gcode_macro M140]
|
|
rename_existing: M140.1
|
|
gcode:
|
|
{% if params.S is defined %}
|
|
SAVE_VARIABLE VARIABLE=bedtemp VALUE={params.S}
|
|
{% endif %}
|
|
M140.1 { rawparams }
|
|
|
|
[gcode_macro Calibrate_Tool_Offset]
|
|
gcode:
|
|
z_endstop_calibrate
|
|
|
|
[gcode_macro M190]
|
|
rename_existing: M190.1
|
|
gcode:
|
|
{% if params.S is defined %}
|
|
SAVE_VARIABLE VARIABLE=bedtemp VALUE={params.S}
|
|
{% endif %}
|
|
M190.1 { rawparams }
|
|
|
|
[gcode_macro M104]
|
|
rename_existing: M104.1
|
|
gcode:
|
|
{% if params.T is defined and params.T == "3"%}
|
|
SET_HEATER_TEMPERATURE HEATER=chamber TARGET={params.S if params.S is defined else "0"}
|
|
{% else %}
|
|
{% if params.S is defined %}
|
|
{% set varname = "t1temp" if params.T is defined and params.T == "1" else "t0temp" %}
|
|
SAVE_VARIABLE VARIABLE={varname} VALUE={params.S}
|
|
{% endif %}
|
|
M104.1 { rawparams }
|
|
{% endif %}
|
|
|
|
[gcode_macro M109]
|
|
rename_existing: M109.1
|
|
gcode:
|
|
{% if params.T is defined and params.T == "3"%}
|
|
SET_HEATER_TEMPERATURE HEATER=chamber TARGET={params.S if params.S is defined else "0"}
|
|
TEMPERATURE_WAIT SENSOR=chamber MINIMUM={params.S} MAXIMUM={params.S}
|
|
{% else %}
|
|
{% if params.S is defined %}
|
|
{% set varname = "t1temp" if params.T is defined and params.T == "1" else "t0temp" %}
|
|
SAVE_VARIABLE VARIABLE={varname} VALUE={params.S}
|
|
{% endif %}
|
|
M109.1 { rawparams }
|
|
{% endif %}
|
|
|
|
[save_variables]
|
|
filename: ~/savedVariables.cfg
|
|
|
|
[gcode_macro SET_GCODE_OFFSET]
|
|
rename_existing: _SET_GCODE_OFFSET
|
|
gcode:
|
|
{% if printer.save_variables.variables.gcode_offsets %}
|
|
{% set offsets = printer.save_variables.variables.gcode_offsets %}
|
|
{% else %}
|
|
{% set offsets = {'x': None,'y': None,'z': None} %}
|
|
{% endif %}
|
|
|
|
{% set ns = namespace(offsets={'x': offsets.x,'y': offsets.y,'z': offsets.z}) %}
|
|
|
|
_SET_GCODE_OFFSET {% for p in params %}{'%s=%s '% (p, params[p])}{% endfor %}
|
|
|
|
{%if 'X' in params %}{% set null = ns.offsets.update({'x': params.X}) %}{% endif %}
|
|
{%if 'Y' in params %}{% set null = ns.offsets.update({'y': params.Y}) %}{% endif %}
|
|
{%if 'Z' in params %}{% set null = ns.offsets.update({'z': params.Z}) %}{% endif %}
|
|
SAVE_VARIABLE VARIABLE=gcode_offsets VALUE="{ns.offsets}"
|
|
|
|
[delayed_gcode LOAD_GCODE_OFFSETS]
|
|
initial_duration: 2
|
|
gcode:
|
|
{% if printer.save_variables.variables.gcode_offsets %}
|
|
{% set offsets = printer.save_variables.variables.gcode_offsets %}
|
|
|
|
_SET_GCODE_OFFSET {% for axis, offset in offsets.items()
|
|
if offsets[axis] %}{ "%s=%s " % (axis, offset) }{% endfor %}
|
|
|
|
{ action_respond_info("Loaded gcode offsets from saved variables [%s]" % (offsets)) }
|
|
{% endif %}
|
|
|
|
# Initialize input shaper on startup (for dual_carriage compatibility)
|
|
[delayed_gcode INIT_INPUT_SHAPER]
|
|
initial_duration: 3
|
|
gcode:
|
|
# Set default input shaper for carriage 0 (T0)
|
|
SET_INPUT_SHAPER SHAPER_FREQ_X=60 SHAPER_TYPE_X=ei SHAPER_FREQ_Y=40 SHAPER_TYPE_Y=ei
|
|
{ action_respond_info("Input shaper initialized for dual carriage") }
|
|
|
|
#[gcode_macro TURN_OFF_HEATERS]
|
|
#description: Turn off heaters and wipe saved temperature variables.
|
|
#rename_existing: TURN_OFF_HEATERS_BASE
|
|
#gcode:
|
|
# TURN_OFF_HEATERS_BASE
|
|
# SAVE_VARIABLE VARIABLE=t0temp VALUE=0
|
|
# SAVE_VARIABLE VARIABLE=t1temp VALUE=0
|
|
# SAVE_VARIABLE VARIABLE=bedtemp VALUE=0
|
|
# SAVE_VARIABLE VARIABLE=chambertemp VALUE=0
|