What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

KAMP not working

Roadrune

Member
Hi guys, rookie here...

I cant for the life of me figure out why KAMP's not working for me, neither adaptive meshing nor purging are working, i am sure there are just an error in one of the macros or .cfg's but i cant figure it out, can anyone figure this out?

Machine is a newly built LDO 2.4r2 350 size with Klicky.

Slicer (Orca) start gcode:
M104 S0 ; Stops OrcaSlicer from sending temp waits separately
M140 S0
M117
print_start EXTRUDER=[first_layer_temperature] BED=[first_layer_bed_temperature] CHAMBER=[chamber_temperature]

Printer.cfg:
# This file contains common pin mappings for the BigTreeTech Octopus V1.
# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader"
# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference
# after running "make", copy the generated "klipper/out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card.
# See docs/Config_Reference.md for a description of parameters.
## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config
## *** THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types
## Z Endstop Switch location [safe_z_home] section
## Homing end position [gcode_macro G32] section
## Z Endstop Switch offset for Z0 [stepper_z] section
## Probe points [quad_gantry_level] section
## Min & Max gantry corner postions [quad_gantry_level] section
## PID tune [extruder] and [heater_bed] sections
## Probe pin [probe] section
## Fine tune E steps [extruder] section
[mcu]
## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
##--------------------------------------------------------------------
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_xxxxxxxxxx335331383820-if00
restart_method: command
##--------------------------------------------------------------------
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3000 #Max 4000
max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V
max_z_accel: 350
square_corner_velocity: 5.0

# Homing and Gantry Adjustment Routines
#####################################################################
[idle_timeout]
timeout: 1800
#[safe_z_home]
## XY Location of the Z Endstop Switch
## Update -10,-10 to the XY coordinates of your endstop pin
## (such as 157,305) after going through Z Endstop Pin
## Location Definition step.
#home_xy_position:234,356
#speed:100
#z_hop:10
#z_hop_speed:5

## Use QUAD_GANTRY_LEVEL to level a gantry.
## Min & Max gantry corners - measure from nozzle at MIN (0,0) and
## MAX (250, 250), (300,300), or (350,350) depending on your printer size
## to respective belt positions
[quad_gantry_level]
#--------------------------------------------------------------------
##
## Gantry Corners for 350mm Build
## Uncomment for 350mm build
gantry_corners:
-60,-10
410,420
## Probe points
points:
50,25
50,275
300,275
300,25
#--------------------------------------------------------------------
speed: 100
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.0075
max_adjust: 10
[bed_mesh]
speed: 300
horizontal_move_z: 10
##--------------------------------------------------------------------
## Uncomment for 350mm build
mesh_min: 40, 40
mesh_max: 310,310
zero_reference_position: 175,175 #for use with stock z endstop
##--------------------------------------------------------------------
#fade_start: 0.6
#fade_end: 10.0
#probe_count: 5,5 # Values should be odd, so one point is directly at bed center
#algorithm: bicubic


[include fluidd.cfg]
[include macros.cfg]

[display_status]
[pause_resume]
[exclude_object]
# This file contains all settings for KAMP, and must be included in printer.cfg with:
[include KAMP_Settings.cfg]
[include config_backup.cfg]
### The following [includes] can be uncommented from within KAMP_Settings.cfg. ###
# This file enables the use of adaptive meshing.
[include ./KAMP/Adaptive_Meshing.cfg]
# This file enables the use of adaptive line purging.
[include ./KAMP/Line_Purge.cfg]
# This file enables the use of the adaptive Voron logo purge.
[include ./KAMP/Voron_Purge.cfg]
# This file enables the use of KAMP's Smart Park feature.
#[include ./KAMP/Smart_Park.cfg]
[autotune_tmc stepper_x]
motor: ldo-42sth48-2004mah
[autotune_tmc stepper_y]
motor: ldo-42sth48-2004mah
[autotune_tmc stepper_z]
motor: ldo-42sth48-2004ac
[autotune_tmc stepper_z1]
motor: ldo-42sth48-2004ac
[autotune_tmc stepper_z2]
motor: ldo-42sth48-2004ac
[autotune_tmc stepper_z3]
motor: ldo-42sth48-2004ac
[autotune_tmc extruder]
motor: ldo-36sth20-1004ahg
#####################################################################
# Macros
#####################################################################
[include klicky-probe.cfg]

#[gcode_macro G32]
#gcode:
# SAVE_GCODE_STATE NAME=STATE_G32
# G90
# G28
#QUAD_GANTRY_LEVEL
#G28


## Uncomment for 350mm build
#G0 X175 Y175 Z30 F3600
#--------------------------------------------------------------------
#RESTORE_GCODE_STATE NAME=STATE_G32
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 40.335
#*# pid_ki = 1.921
#*# pid_kd = 211.758
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 34.295
#*# pid_ki = 4.314
#*# pid_kd = 68.162
#*#
#*# [stepper_z]
#*# position_endstop = -1.060
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.030000, 0.045000, 0.070000, 0.038750, -0.015000
#*# -0.070000, -0.000000, 0.016250, -0.023750, -0.075000
#*# -0.066250, -0.007500, 0.000000, -0.040000, -0.085000
#*# -0.063750, -0.008750, 0.007500, -0.025000, -0.072500
#*# -0.026250, 0.030000, 0.052500, 0.022500, -0.027500
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 40.0
#*# max_x = 310.0
#*# min_y = 40.0
#*# max_y = 310.0
#*#
#*# [probe]
#*# z_offset = 5.010
 
Macros.cfg:
#####################################################################
# print_start macro
#####################################################################
## *** THINGS TO UNCOMMENT: ***
## Bed mesh (2 lines at 2 locations)
## Z_TILT_ADJUST if your printer is a Trident
## Quad gantry level if your printer is a V2
## Nevermore - if you have one
[gcode_macro PRINT_START]
gcode:
# This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer.
{% set target_bed = params.BED|int %}
{% set target_extruder = params.EXTRUDER|int %}
{% set target_chamber = params.CHAMBER|default("40")|int %}
{% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
{% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}

SET_PIN PIN=caselight VALUE=0.75


# Homes the printer, sets absolute positioning and updates the Stealthburner leds.
#STATUS_HOMING # Sets SB-leds to homing-mode
G28 # Full home (XYZ)
G90 # Absolut position
## Uncomment for bed mesh (1 of 2)
BED_MESH_CLEAR # Clears old saved bed mesh (if any)
# Checks if the bed temp is higher than 90c - if so then trigger a heatsoak.
{% if params.BED|int > 90 %}
SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
STATUS_HEATING # Sets SB-leds to heating-mode
M106 S255 # Turns on the PT-fan
## Uncomment if you have a Nevermore.
#SET_PIN PIN=nevermore VALUE=1 # Turns on the nevermore
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M190 S{target_bed} # Sets the target temp for the bed
SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info
TEMPERATURE_WAIT SENSOR="temperature_sensor chamber_temp" MINIMUM={target_chamber} # Waits for chamber to reach desired temp
# If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak
{% else %}
SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
STATUS_HEATING # Sets SB-leds to heating-mode
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M190 S{target_bed} # Sets the target temp for the bed
SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info
G4 P300000 # Waits 5 min for the bedtemp to stabilize
{% endif %}
# Heating nozzle to 150 degrees. This helps with getting a correct Z-home
SET_DISPLAY_TEXT MSG="Hotend: 150c" # Displays info
M109 S150 # Heats the nozzle to 150c
## Uncomment for Trident (Z_TILT_ADJUST)
#SET_DISPLAY_TEXT MSG="Z-tilt adjust" # Displays info
#STATUS_LEVELING # Sets SB-leds to leveling-mode
#Z_TILT_ADJUST # Levels the buildplate via z_tilt_adjust
#G28 Z # Homes Z again after z_tilt_adjust
## Uncomment for V2 (Quad gantry level AKA QGL)
SET_DISPLAY_TEXT MSG="QGL" # Displays info
STATUS_LEVELING # Sets SB-leds to leveling-mode
quad_gantry_level # Levels the buildplate via QGL
G28 Z # Homes Z again after QGL
## Uncomment for Klicky auto-z
#CALIBRATE_Z # Calibrates Z-offset with klicky
#SET_DISPLAY_TEXT MSG="Z-offset" # Displays info
## Uncomment for bed mesh (2 of 2)
SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info
STATUS_MESHING # Sets SB-leds to bed mesh-mode
bed_mesh_calibrate # Starts bed mesh
# Heats up the nozzle up to target via data from slicer
SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info
STATUS_HEATING # Sets SB-leds to heating-mode
G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
M107 # Turns off partcooling fan
M109 S{target_extruder} # Heats the nozzle to printing temp
# Gets ready to print by doing a purge line and updating the SB-leds
SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info
STATUS_PRINTING # Sets SB-leds to printing-mode
G0 X{x_wait - 50} Y4 F10000 # Moves to starting point
G0 Z0.4 # Raises Z to 0.4
G91 # Incremental positioning
G1 X100 E20 F1000 # Purge line
G90 # Absolut position
################################################################################
# PRINT END
# A macro to execute when your print is done
################################################################################
[gcode_macro PRINT_END]
gcode:
M400 ; wait for buffer to clear
FEEDBACK MSG="Print successful!"
BED_MESH_CLEAR
G92 E0 ; zero the extruder
G1 X345 Y345 F20000 E-10.0 F3600 ; retract filament
G91 ; relative positioning
#G0 Y20.0 F20000
#G1 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z2 F3000 ; move nozzle up 2mm
G90 ; absolute positioning
PARK HOP=5
M18
# If a filter is connected, filter the air at full power
# for a couple of min before stopping everything
{% set FILTER_TIME = params.FILTER_TIME|default(10)|int %}
#START_FILTER SPEED=1
#UPDATE_DELAYED_GCODE ID=_STOP_FILTER_DELAYED DURATION={FILTER_TIME}
SET_PIN PIN=caselight VALUE=0{light_intensity_end_print}
STATUS_OFF


[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
description: Pause the print and park
gcode:
G92 E0
G1 E-1.0 F1500.0
G90
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
#PARK
LIGHT_ON

[gcode_macro RESUME]
rename_existing: BASE_RESUME
description: Resume the print after an optional unretract
gcode:
# {% set St = printer["gcode_macro _USER_VARIABLES"].travel_speed * 60 %}
#
# RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 MOVE_SPEED={St}
#
# LIGHT_ON S=30
# BASE_RESUME
#{% if printer.ercf.is_paused|int == 1 %}
#M118 You can't resume the print without unlocking the ERCF first.
#M118 Run ERCF_UNLOCK and solve any issue before hitting Resume again
#{% else %}
RESTORE_GCODE_STATE NAME=PAUSE_state
G90
#{% if printer.ercf.clog_detection|int == 1 %}
# SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1
#{% endif %}
BASE_RESUME
#{% endif %}

[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
description: Cancel the print, retract 10mm of filament and park
gcode:
# PARK
# _TIP_SHAPING
# G1 E-10 F2100

# TURN_OFF_HEATERS
# M107
# M400
# CLEAR_PAUSE
# BED_MESH_CLEAR
# SDCARD_RESET_FILE

# STOP_FILTER
# LIGHT_OFF
# STATUS_OFF
# BASE_CANCEL_PRINT
TURN_OFF_HEATERS
CLEAR_PAUSE
#SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=0
#PARK
BASE_CANCEL_PRINT
# Macros for setting the status leds on the Voron StealthBurner toolhead (or for any neopixel-type leds).
#
# You will need to configure a neopixel (or other addressable led, such as dotstar). See
# https://www.klipper3d.org/Config_Reference.html#neopixel for configuration details.
 
KAMP_settings.cfg:
# Below you can include specific configuration files depending on what you want KAMP to do:
[include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration.
# [include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration.
[include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration.
# [include ./KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating.
[gcode_macro _KAMP_Settings]
description: This macro contains all adjustable settings for KAMP
# The following variables are settings for KAMP as a whole.
variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging.
# The following variables are for adjusting adaptive mesh settings for KAMP.
variable_mesh_margin: 1 # Expands the mesh size in millimeters if desired. Leave at 0 to disable.
variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable.
# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro
variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # ---------------------------------------------
variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe'
variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe'
# Legacy Gcode: 'M401' | 'M402'
# The following variables are for adjusting adaptive purge settings for KAMP.
variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8.
variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount.
variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10.
variable_purge_amount: 30 # Amount of filament to be purged prior to printing.
variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12.
# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height.
variable_smart_park_height: 10 # Z position for Smart Park, default is 10.
gcode: # Gcode section left intentionally blank. Do not disturb.
{action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")}

Moonraker.conf:
[server]
host: 0.0.0.0
port: 7125
klippy_uds_address: /home/roadrune/printer_data/comms/klippy.sock
[authorization]
trusted_clients:
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.168.0.0/16
FE80::/10
::1/128
cors_domains:
*.lan
*.local
*://localhost
*://localhost:*
*://my.mainsail.xyz
*://app.fluidd.xyz
[octoprint_compat]
[history]
[update_manager]
channel: dev
refresh_interval: 168
[update_manager fluidd-config]
type: git_repo
primary_branch: master
path: ~/fluidd-config
origin: https://github.com/fluidd-core/fluidd-config.git
managed_services: klipper
[update_manager fluidd]
type: web
channel: stable
repo: fluidd-core/fluidd
path: ~/fluidd
[update_manager mobileraker]
type: git_repo
path: /home/roadrune/mobileraker_companion
origin: https://github.com/Clon1998/mobileraker_companion.git
primary_branch:main
managed_services: mobileraker
env: /home/roadrune/mobileraker-env/bin/python
requirements: scripts/mobileraker-requirements.txt
install_script: scripts/install-mobileraker-companion.sh
[include octoeverywhere-system.cfg]
[file_manager]
enable_object_processing: True
[update_manager Klipper-Adaptive-Meshing-Purging]
type: git_repo
channel: dev
path: ~/Klipper-Adaptive-Meshing-Purging
origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git
managed_services: klipper
primary_branch: main
 
Go to the command line in klipper after you heat up and have already homed and type voron_purge and then click enter. Does it purge? If so then you are just missing the gcode from either your print start gcode or your initial slicer print start gcode. Which is what I assume you are. It says that you need to add it in the instructions.
 
Voron_purge command works, thing is i dont understand what i need to change and where... Start print macro have "bed_mesh_calibrate" in it, if i replace it i get an error.
 
What is the output in the console when bed_mesh_calibrate runs during the print?
 
Top