Error starting prints

Hello,

I just finished setting up my Ender 3 with Klipper (Mainsail OS on RPi 4), but I’m getting errors when trying to print. This happens at the start of the print, during the Start G-code. Tried latest Cura and SuperSlicer and these are the results:

If I use Cura’s default Start G-Code I get:

Error on ‘M104 S{material_standby_temperature} ; Start heating up the nozzle most of the way’: unable to parse {

If I use SuperSlicer’s default Start G-Code I get:

Error on ‘M140 S[first_layer_bed_temperature] ; set final bed temp’: unable to parse [

Any help would be highly appreciated.

Cura’s Start-Gcode

; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28 ; Home all axes
M104 S{material_standby_temperature} ; Start heating up the nozzle most of the way
M190 S{material_bed_temperature_layer_0} ; Start heating the bed, wait until target temperature reached
M109 S{material_print_temperature_layer_0} ; Finish heating the nozzle
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

SuperSlicer’s Start-Gcode:

G90 ; use absolute coordinates
M83 ; extruder relative mode
M140 S[first_layer_bed_temperature] ; set final bed temp
M104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling
G4 S10 ; allow partial nozzle warmup
G28 ; home all axis
G1 Z50 F240
G1 X2 Y10 F3000
M104 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; set final nozzle temp
M190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize
M109 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; wait for nozzle temp to stabilize
G1 Z0.28 F240
G92 E0
G1 Y140 E10 F1500 ; prime the nozzle
G1 X2.3 F5000
G92 E0
G1 Y10 E10 F1200 ; prime the nozzle
G92 E0

Hello @iCach0 !

Have you put these start codes somewhere in OctoPrint/Fluid/Mainsail?

No, just in the slicer for now.

OK, I think I understand what’s going on now. It’s my fault for not understanding how variables work. Now that I read your reply it all clicked for me.

I was calibrating my printer using TeachingTech’s excellent first layer calibration page. So instead of slicing a file in the slicer like one would regularly do, I copied and pasted the start and end g-code from the slicer into your first layer calibration page.

That’s why the slicer never got the chance to replace the variable with its actual value and klipper was rightfully complaining.

Leaving this here in case anyone runs into a similar problem.

1 Like