Custom Start G-Code
Hey, i want to do a special Start G-Code for my Prusa Mk3s. I want to do something like this:
M104 S{[first_layer_temperature] - 50} ; custom hot end temp minus 50 degrees
But it didn´t work like this. What did i make wrong?
Best Answer by karl-herbert:
the syntax is as follows:
M104 S{first_layer_temperature[initial_tool]+10}
see here: https://help.prusa3d.com/article/macros_1775
wbr,
Karl
RE:
Not sure what the problem is but
M104 S[first_layer_temperature]
is legal. Maybe the second set of brackets? Or maybe round brackets, Slic3r (from which Prusaslicer was forked) variable syntax is all over the place.
RE: Custom Start G-Code
the syntax is as follows:
M104 S{first_layer_temperature[initial_tool]+10}
see here: https://help.prusa3d.com/article/macros_1775
wbr,
Karl
Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.
RE: Custom Start G-Code
@karl Thanks for the info and particularly the link. BTW it seems you can reduce initial_tool to 0.
RE: Custom Start G-Code
I think thats because Extruder 1 = Tool 0, extruder 2 = tool 1. Like a lot of code tables start from index 0 and not index 1.
RE: Custom Start G-Code
Thanks you very much! With your help, i could fix my problem 😀 The Prusa Community is really the best i know!
This g-code works fine:
M104 S{first_layer_temperature[0] - 50} ; custom hot end temp minus 50 degrees
RE: Custom Start G-Code
list of PS placeholders: https://help.prusa3d.com/article/list-of-placeholders_205643
wbr,
Karl
Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.