Basic Information:
Printer Model: Elegoo OS Giga
klippy.log
klippy.zip (1.1 MB)
Describe your issue:
Hello all,
I’m trying to get KAMP to work properly, but I’m failing at simple tasks like getting the printer to start in the right sequence. Due to the printer being a Elegoo OS Giga (for those who aren’t familiar, it has 4 print beds acting as one but still controllable separately), the start sequence in the gcode file is not straight forward and I’m a bit lost in the documentation. I hoped that maybe someone with more knowledge then I have would be able to help me.
What I want, is for the printer to start the print in the following way:
- Start heating to final temperature
- In the meantime, home all axis
- Wait for temperature of bed to reach desired threshold
- Start adaptive meshing
- Smart park the printhead
- Purge a line
- Start print
What I’m stuck at the moment and can’t figure out is how to pass the temperature settings to the gcode-macro for it to heat up and wait until it’s done. Which beds need to heat up is controlled by a start-gcode-macro in the slicer, but it makes it hard for me to understand how to pass them to my printers gcode-macro.
Start macro in the slicer:
EXTRUDER_TEMP={first_layer_temperature[initial_extruder]}
;;===== date: 20240520 =====================
;Machine_use_extruders:1
;TIME:
M400 ; wait for buffer to clear
;[printer_model]
;initial_filament:{filament_type[initial_extruder]}
;curr_bed_type={curr_bed_type}
M220 S100 ;Set the feed speed to 100%
M221 S100 ;Set the flow rate to 100%
;Giga zoned hot bed control
;Case 1
M140 S0
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) < 405 && (max(0, first_layer_print_min[1])) < 402.5}
M140 T0 S[bed_temperature_initial_layer_single]
BED_TEMP = T0 S[bed_temperature_initial_layer_single]
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405}
M140 T1 S[bed_temperature_initial_layer_single]
BED_TEMP = T1 S[bed_temperature_initial_layer_single]
{endif}
{if ((first_layer_print_max[1])) > 402.5}
M140 T3 S[bed_temperature_initial_layer_single]
BED_TEMP = T3 S[bed_temperature_initial_layer_single]
{endif}
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405 && ((first_layer_print_max[1])) > 402.5}
M140 T2 S[bed_temperature_initial_layer_single]
BED_TEMP = T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 2
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) < 405 && (max(0, first_layer_print_min[1])) > 402.5}
M140 T3 S[bed_temperature_initial_layer_single]
BED_TEMP = T3 S[bed_temperature_initial_layer_single]
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405}
M140 T2 S[bed_temperature_initial_layer_single]
BED_TEMP = T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 3
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) > 405 && (max(0, first_layer_print_min[1])) < 402.5}
M140 T1 S[bed_temperature_initial_layer_single]
BED_TEMP = T1 S[bed_temperature_initial_layer_single]
{if ((first_layer_print_max[1])) > 402.5}
M140 T2 S[bed_temperature_initial_layer_single]
BED_TEMP = T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 4
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) > 405 && (max(0, first_layer_print_min[1])) > 402.5}
M140 T2 S[bed_temperature_initial_layer_single]
BED_TEMP = T2 S[bed_temperature_initial_layer_single]
{endif}
G90
;
;Giga zoned hot bed control
;Case 1
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) < 405 && (max(0, first_layer_print_min[1])) < 402.5}
M190 T0 S[bed_temperature_initial_layer_single]
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405}
M190 T1 S[bed_temperature_initial_layer_single]
{endif}
{if ((first_layer_print_max[1])) > 402.5}
M190 T3 S[bed_temperature_initial_layer_single]
{endif}
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405 && ((first_layer_print_max[1])) > 402.5}
M190 T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 2
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) < 405 && (max(0, first_layer_print_min[1])) > 402.5}
M190 T3 S[bed_temperature_initial_layer_single]
{if ((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) > 405}
M190 T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 3
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) > 405 && (max(0, first_layer_print_min[1])) < 402.5}
M190 T1 S[bed_temperature_initial_layer_single]
{if ((first_layer_print_max[1])) > 402.5}
M190 T2 S[bed_temperature_initial_layer_single]
{endif}
{endif}
;Case 4
{if (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32) > 405 && (max(0, first_layer_print_min[1])) > 402.5}
M190 T2 S[bed_temperature_initial_layer_single]
{endif}
G1 Z0.4 F300
M109 S[nozzle_temperature_initial_layer]
G92 E0 ;Reset Extruder
G1 X{print_bed_max[0]*0.75+50} E30 F400 ;Draw the first line
G1 Z0.6 F120.0 ;Move to side a little
G1 X{print_bed_max[0]*0.75+47} F3000
G92 E0 ;Reset Extruder
;LAYER_COUNT:[total_layer_count]
;LAYER:0
And here is the Start gcode-macro on my printer (shamelessly stolen from K1 Helper Script) with a few things I tried to change:
[gcode_macro PRINT_START]
variable_prepare: 0
gcode:
CLEAR_PAUSE
{% if 'BED_TEMP' in params|upper and (params.BED_TEMP|float) %}
{% set bed_temp = params.BED_TEMP %}
{% endif %}
{% if 'EXTRUDER_TEMP' in params|upper and (params.EXTRUDER_TEMP|float) %}
{% set extruder_temp = params.EXTRUDER_TEMP %}
{% endif %}
{% if printer['gcode_macro PRINT_START'].prepare|int == 0 %}
PRINT_PREPARE_CLEAR
G28
M140 {bed_temp}
{% if printer['output_pin ADAPTIVE_BED_MESH'].value == 1 %}
RESPOND TYPE=command MSG="Starting Adaptive Bed Mesh..."
BED_MESH_CLEAR
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=adaptive
BED_MESH_PROFILE LOAD=adaptive
{% else %}
{% if printer['output_pin FULL_BED_MESH'].value == 0 and (not printer['bed_mesh'].profile_name) %}
RESPOND TYPE=command MSG="No bed mesh found. Starting Full Bed Mesh..."
PRINT_LEVELING_CALIBRATION
{% endif %}
{% if printer['output_pin FULL_BED_MESH'].value == 1 %}
RESPOND TYPE=command MSG="Starting Full Bed Mesh..."
PRINT_LEVELING_CALIBRATION
{% endif %}
BED_MESH_PROFILE LOAD=default
{% endif %}
{% else %}
PRINT_PREPARE_CLEAR
{% endif %}
{% if printer['output_pin ADAPTIVE_PURGE_LINE'].value == 1 %}
SMART_PARK
M109 S{extruder_temp}
M190 S{bed_temp}
RESPOND TYPE=command MSG="Starting Adaptive Purge Line..."
LINE_PURGE
{% else %}
RESPOND TYPE=command MSG="Starting Classic Purge Line..."
PRINT_DRAW_ONE_LINE
{% endif %}
SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel}
I ask kindly to not shame me for any obvious mistakes. I’m trying my best to not just simply rely on forums and do my own research, but I’m hopelessly lost here.