Some Klipper versions expect this macro to be defined. Added a simple placeholder macro to prevent: 'Option gcode in section gcode_macro SDCARD_RESET_FILE must be specified'
114 lines
4.1 KiB
INI
114 lines
4.1 KiB
INI
# ============================================================================
|
|
# KNCM - Nozzle Cleaning Macros
|
|
# Simplified nozzle cleaning for reliable prints
|
|
# ============================================================================
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# SDCARD_RESET_FILE - Fix for Klipper SD card reset error
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro SDCARD_RESET_FILE]
|
|
description: Reset SD card file (placeholder to prevent errors)
|
|
gcode:
|
|
# Placeholder - SD card operations handled by Klipper
|
|
RESPOND MSG="SD card reset acknowledged"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# PRINTER VARIABLES - Neptune 4 Plus
|
|
# ----------------------------------------------------------------------------
|
|
# Adjust these values in your user_settings.cfg if needed!
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Bed dimensions (not nozzle travel, but usable bed area)
|
|
# N4=229, N4Plus=330, N4Max=430
|
|
# This is set via mesh_max in [bed_mesh] section
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# CLEAN_NOZZLE - Wipe nozzle on brush/cloth
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro CLEAN_NOZZLE]
|
|
description: Clean nozzle on brush or cloth
|
|
gcode:
|
|
{% set FILAMENT_TYPE = params.FILAMENT_TYPE|default("PLA")|upper %}
|
|
{% set CLEAN_X = params.CLEAN_X|default(0)|int %}
|
|
{% set CLEAN_Y = params.CLEAN_Y|default(0)|int %}
|
|
{% set CLEAN_Z = params.CLEAN_Z|default(0.5)|float %}
|
|
{% set PASSES = params.PASSES|default(3)|int %}
|
|
|
|
RESPOND MSG="Cleaning nozzle..."
|
|
|
|
# Move to clean position
|
|
G1 X{CLEAN_X} Y{CLEAN_Y} Z{CLEAN_Z} F3000
|
|
|
|
# Wipe passes
|
|
{% for i in range(PASSES) %}
|
|
G1 X{CLEAN_X + 10} F1800
|
|
G1 X{CLEAN_X} F1800
|
|
{% endfor %}
|
|
|
|
# Lift Z
|
|
G1 Z10 F600
|
|
|
|
RESPOND MSG="Nozzle clean complete!"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# SMART_PARK - Park near front for easy access
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro SMART_PARK]
|
|
description: Park nozzle at front of bed for easy access
|
|
gcode:
|
|
{% set PARK_X = params.PARK_X|default(165)|int %}
|
|
{% set PARK_Y = params.PARK_Y|default(10)|int %}
|
|
{% set PARK_Z = params.PARK_Z|default(50)|int %}
|
|
|
|
G1 X{PARK_X} Y{PARK_Y} Z{PARK_Z} F6000
|
|
|
|
RESPOND MSG="Printer parked at front"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# LINE_PURGE - Print purge line at start of bed
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro LINE_PURGE]
|
|
description: Print purge line at start of bed
|
|
gcode:
|
|
{% set PURGE_START_X = params.START_X|default(10)|int %}
|
|
{% set PURGE_END_X = params.END_X|default(300)|int %}
|
|
{% set PURGE_Y = params.Y|default(10)|int %}
|
|
{% set PURGE_Z = params.Z|default(0.2)|float %}
|
|
{% set PURGE_AMOUNT = params.AMOUNT|default(30)|int %}
|
|
|
|
# Move to purge start
|
|
G1 X{PURGE_START_X} Y{PURGE_Y} Z{PURGE_Z} F3000
|
|
|
|
# Extrude purge line
|
|
G1 X{PURGE_END_X} E{PURGE_AMOUNT} F600
|
|
|
|
# Lift Z
|
|
G1 Z2 F600
|
|
|
|
RESPOND MSG="Purge line printed"
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Frame Light Control (Neptune 4 Plus)
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro Frame_Light_ON]
|
|
description: Turn on frame LED lights
|
|
gcode:
|
|
SET_PIN PIN=frame_light VALUE=1
|
|
|
|
[gcode_macro Frame_Light_OFF]
|
|
description: Turn off frame LED lights
|
|
gcode:
|
|
SET_PIN PIN=frame_light VALUE=0
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Part Light Control (Neptune 4 Plus)
|
|
# ----------------------------------------------------------------------------
|
|
[gcode_macro Part_Light_ON]
|
|
description: Turn on part cooling fan light
|
|
gcode:
|
|
SET_PIN PIN=part_light VALUE=1
|
|
|
|
[gcode_macro Part_Light_OFF]
|
|
description: Turn off part cooling fan light
|
|
gcode:
|
|
SET_PIN PIN=part_light VALUE=0
|