Luke3
August 7, 2023, 6:38pm
1
Hello
I would like to change my start gcode so that PETG activates a different Z offset than, for example, pla on the textured plate.
Here is some information about what you can do in the slicer start gcode, but I can’t get it right…
by default it looks like this:
;curr_bed_type={curr_bed_type}
{if curr_bed_type==“Textured PEI Plate”}
G29.1 Z{-0.04} ; for Textured PEI Plate
{endif}
and this is how I thought:
;curr_bed_type={curr_bed_type}
{if curr_bed_type==“Textured PEI Plate”&&filament_type[initial_extruder]==“PETG”}
G29.1 Z{-0.02} ; for Textured PEI Plate with PETG
{if curr_bed_type==“Textured PEI Plate”!filament_type[initial_extruder]==“PETG”}
G29.1 Z{-0.04} ; for Textured PEI Plate
{endif}
unfortunately it doesn’t work that way.
I’m not sure what programming language is used.
This code should do what you want although I have not tested it.
;curr_bed_type={curr_bed_type}
{if curr_bed_type=="Textured PEI Plate"}
G29.1 Z{-0.04} ; Offset for Textured PEI Plate for all filaments
{if filament_type[initial_no_support_extruder]=="PETG"}
G29.1 Z{-0.02};For Textured PEI plate with PETG only offset -0.02mm
{endif}
I think you want something like this:
;curr_bed_type={curr_bed_type}
{ if curr_bed_type == “Textured PEI Plate” }
{ if filament_type[0] == “PETG” }
G29.1 Z-0.02
{else}
G29.1 Z-0.04
{endif}
{endif}
I have not tested this, and I’d check that [0] is the correct way to address the extruder. Haven’t tried that before.
But how about this instead:
In the PETG filament profile start gcode, add the following at the end:
G29.1 Z+0.02 ; raise Z offset for PETG
The machine gcode will have already set the Textured PEI default and this just raises it by 0.02mm. A bit simpler and easier to control.
BTW, this is gcode macro syntax. The reference is here .
3 Likes
Just woundering why do you want to change the bed height for petg?
First, this does not raise the bed height, it increases the Z offset (lowers the bed in the case of a Core XY printer like this).
The intent is to reduce the buildup of crud on the hot end nozzle by giving it a bit more “space.” PETG sticks to itself really, really, well and it is common to have big blobs of melted filament deposit themselves in the most conspicuous place on your object.
The Textured PEI bed likes to have more “squish” to improve adhesion, so the default is to lower the Z offset a bit. This undoes some of that change for PETG.
Luke3
August 9, 2023, 9:40am
6
@azCubs76
If I use your code it throws this error:
@Rom3oDelta7
Your code works fine. Thank you very much!
Luke3
August 9, 2023, 9:44am
7
If I use this in the filament gcode will this add the +0.02 to the G29.1 Z-0.04 from start gcode or overwrite it?
The + in the number means to add it to the current value. If you used 0.02 without the plus then it would set it to that value.
Luke3
August 9, 2023, 5:50pm
9
Thanks for sharing this information