Perpetual issues with start macros, and other issues

Basic Information:

ENDER V3 KE firmware 1.x.x.12 Rooted, Fluidd installed
Nebula Pad
Klippy logs may not have full history as I have flashed back to stock, then to mainsail but got the same results and then back to fluidd

I am totally new at klipper after several years with marlin and really need some compassionate instruction as we were all beginners once, and I am struggling to learn the new language. Im not a coder, I just want my investment to work without it having to be a hobby.


klippy3-6.zip (124.8 KB)

I am having an awful time getting a working start print macro setup for my printer. I will copy directly from Klippers repository and paste into my machine macros and be met with fail codes when I thought I followed the example correctly. I literally only want to enable my bed mesh i waste 5 minutes generating.

My start print macro is written as:

[gcode_macro START_PRINT]
gcode: (everything below is properly tabbed, it just didnt paste formatted)
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Heat bed for probing
G92 E0 ; Reset Extruder
M104 S{EXTRUDER_TEMP} ;Start heating extruder
M140 S{BED_TEMP} ;Start heating bed
G28 ; Home all axes
#M190 S{BED_TEMP} ;Wait for bed to reach temp before proceeding
BED_MESH_PROFILE LOAD=default
#M109 S{EXTRUDER_TEMP} ;Wait for extruder to reach temp before
proceeding

TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp}
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

I use PrusaSlicer, so my start gcode is:
M109 S0
M190 S0
start_print EXTRUDER_TEMP={first_layer_temperature[initial_extruder]} BED_TEMP={first_layer_bed_temperature[initial_extruder]}

And every print ends with some parsing error, or :
!! {“code”:“key165”, “msg”: "Error evaluating ‘gcode_macro START_PRINT:gcode’: jinja2.exceptions.UndefinedError: ‘bedTemp’ is undefined

ADDITIONALLY, any time I try to send a command from my computer like save_config I get met on the printer screen with an “Error: 3000” code that wont let me proceed until I manually clear it, negating the whole purpose of klippers online interface. If I try to upload the error log to the “creality cloud”, which I think is the same cloud Charmin is made from, I get a 2011 or 2001 error code.

Any genuine advice is greatly appreciated; Ive been commissioned to print 150 penguins for a first grade class and need this running perfectly.

Well, firstly, from your log:

Your Klipper install both has local modifications and does not correspond to any commit from the official Klipper repository, so people here may be limited in the amount of support they are able to provide.

Secondly, Discourse supports Markdown formatting in posts so surrounding your config with ``` will preserve the formatting and be easier to read.

This error cannot have been generated while running with the config you posted, as bedTemp does not appear anywhere in this macro. There is an undefined variable, but it’s named toolTemp:

TEMPERATURE_WAIT SENSOR=extruder MINIMUM={toolTemp}

This line should probably be

TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP}

since that’s the actual name of a variable from earlier in the macro.

2 Likes

I don’t have any reason to lie about the error code coming from this cfg and macro attempt. I’ll try your suggestion and see if it fixes it

I believe the bedtemp comes from my slicer start code but I’m doing something wrong to make it translate

It doesn’t matter whether you have a reason to lie, what matters is that you are mistaken. Either this is not the running code or you did not receive that error. You need to figure out which is the case, because we do not have access to your environment.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.