Notifications
Clear all

Custom Start G-Code  

  RSS
INVESTEGATE
(@investegate)
Eminent Member
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

 

Napsal : 09/06/2022 5:56 pm
towlerg
(@towlerg)
Noble Member
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. 

This post was modified před 2 years by towlerg
Napsal : 09/06/2022 6:35 pm
karl-herbert
(@karl-herbert)
Illustrious Member
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.

Napsal : 09/06/2022 8:56 pm
INVESTEGATE se líbí
towlerg
(@towlerg)
Noble Member
RE: Custom Start G-Code

@karl  Thanks for the info and particularly the link. BTW it seems you can reduce initial_tool to 0.

Napsal : 10/06/2022 9:42 am
Neophyl
(@neophyl)
Illustrious Member
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.

Napsal : 10/06/2022 10:40 am
INVESTEGATE se líbí
INVESTEGATE
(@investegate)
Eminent Member
Topic starter answered:
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

 

Napsal : 10/06/2022 11:42 am
karl-herbert
(@karl-herbert)
Illustrious Member
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.

Napsal : 10/06/2022 1:26 pm
Share: