Issue not loading start macro

Basic Information:

Printer Model: Mercury 1.1
MCU / Printerboard: Manta M5P with CB1
klippy (3).log (2.6 MB)

Describe your issue:

When I go to start a print the start macro is not recognized or isn’t working for some reason. It did work and I got one test print off then stopped working. The printer tosses a extruder below min temp error. When I preheat the printer and start the print it just tries to start printing wherever the toolhead is.

I’ve deleted, re-installed and changed to different start macros but it just ignores the start macro. I know the macro works fine as it’s on 2 other printers without issues. I use cura and yes the start gcode is correctly set up in it.


Your PRINT_START macro does not really do anything meaningful. See for a proper example

Ive put that one in also and it gets ignored also. This issue is that the start macro is being ignored. Doesnt matter what macro is there.

Is that macro even called by the gcode file generated by the slicer?

Yes, not at the printer but it is. Its from the better start macro github

Please show a small sliced gcode file as attachment here.


here is the one I was trying to print.
VT250_Calibration_Cube_Oriented.gcode (432.1 KB)

yes it says start print in that one, I was trying to see if it would make a difference and it didn’t. Going to delete the start macro and try the generic one again.

This is your STAR_PRINT macro according to the provided log:

[gcode_macro PRINT_START]
gcode = 
	{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
	{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
	{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
	{% if printer.toolhead.position.x < (max_x - 20) %}
	{% set x_safe = 20.0 %}
	{% else %}
	{% set x_safe = -20.0 %}
	{% endif %}
	{% if printer.toolhead.position.y < (max_y - 20) %}
	{% set y_safe = 20.0 %}
	{% else %}
	{% set y_safe = -20.0 %}
	{% endif %}
	{% if printer.toolhead.position.z < (max_z - 2) %}
	{% set z_safe = 2.0 %}
	{% else %}
	{% set z_safe = max_z - printer.toolhead.position.z %}
	{% endif %}
	G92 E0
	G1 E-4.0 F3600
	G0 Z{z_safe} F3600
	G0 X{x_safe} Y{y_safe} F20000
	M104 S0
	M140 S0
	M106 S0
	G0 X{max_x / 2} Y{max_y} F3600
	M117 Finished!

As already indicated in my first post, this macro does nothing meaningful. It does not take temperatures, neither for the extruder nor for the hotend nor anything else.

Within your gcode, you are passing:

start_print EXTRUDER=210.0 BED=65

but since the macro is not setup to take any such values, consequently nothing happens.

In the macro I also provided the link for, you will find:

    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}

These two lines make the macro accept the desired parameters. Note that you need to modify your slicer to create:


In addition:
You also named your macro PRINT_START but from the slicer you are passing start_print. Apart from the general issue with the macro as detailed above, this also cannot work.

I honestly have no idea what that start macro you posted is. This is a direct cut and paste from my config.

## 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]
  # 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 %}

  # Homes the printer, sets absolute positioning and updates the Stealthburner leds.
  #STATUS_HOMING         # Sets SB-leds to homing-mode
  G28 X
  G28 Y
  G28 Z                 # 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" 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 3min"                # Displays info
    G4 P180000                                          # Waits 3 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} Y10 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

I honestly have no idea, what you think you are using. Check your klippy.log you posted above and you will see what Klipper is using.
The klippy.log always contains the config that Klipper actually has parsed / is using and if this differs from your intention then something is amiss.

And in addition:
Even IF your your klippy log NOW contains the macro you just posted:

The macros name is PRINT_START and from your slicer you are passing start_print

Thats why I came here. I’ve deleted the entire macro, re-installed it and now it seems to be working. Tried that 3 times yesterday and nothing changed. Now it seems to be doing its thing. I’ll post back in 10

Nope. Looked a the klippy log and it shows that effed up print_start macro not the one I show in my config. let me grab that.
printer.cfg (13.5 KB)

So I have zero idea where klipper is getting that other one from.

latest log.
klippy (5).log (3.8 MB)

had someone helping me on discord, went through a mountain of items. In short I have to do a re-install of the OS because what is happening is “impossible” and it’s haunted. He said its as if the machine is looking at a different host. So fresh os install underway.

So after a completely full and fresh install the problem is still there. In the Variables cfg this shows up at the bottom of the cfg under gcode. I don’t know if there is a header missing above the gcode statement or what. But it is what is over riding my print_start macro. Also I can home all axis individually but when I tried to home all at once it doesn’t work either. Only when the klicky stuff is enabled, once I disable it all the printer works fine. So something is buggy with this klicky macros and cfg. Hopefully someone has an answer, but for now its getting all yanked and going to an inductive probe so I can actually use my printer.

Not sure that I understand what you are reporting:
Your initial post is about the start macro and now some ramblings about the probe.

Please be more precise and in any case attach a klippy.log and in addition your complete cfg files

I’ll slow it down. When Klicky probe macros and configs are installed the gcode file in the variables section is over writing my print_start macro in my printer cfg. If I remove everything to do with Klicky and use a normal inductive probe the printer works fine. Something in the klicky macros and configs is overwriting my print_start macro. Attached is the latest log.
klippy (9).log (1.8 MB)

attached is my printer cfg
printer (2).cfg (13.6 KB)