PS syntax for nozzle temp to wait at 90% till bed up to temp
 
Notifications
Clear all

PS syntax for nozzle temp to wait at 90% till bed up to temp  

  RSS
towlerg
(@towlerg)
Noble Member
PS syntax for nozzle temp to wait at 90% till bed up to temp

Part of my start code is

M104 S[first_layer_temperature] ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S[first_layer_temperature] ; wait for extruder temp

This has bed and nozzle heat up independantly.

 

I guess the following will do what I want but I don't understand PS syntax.

M104 S[90% of first_layer_temperature] ; set extruder temp to 90%
M140 S[first_layer_bed_temperature]      ; set bed temp
M190 S[first_layer_bed_temperature]      ; wait for bed temp
M104 S[first_layer_temperature]               ; set real extruder temp
M109 S[first_layer_temperature]               ; wait for extruder temp

Anyone?

Is there any notes on PS syntax?

 

Posted : 10/10/2020 4:23 pm
Area51
(@area51)
Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

Maybe this is what you are looking for: https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-placeholders-(a-copy-of-the-mauk.cc-page)

I am more unsure, how the math works - This could maybe work:

M104 S0.9*[first_layer_temperature] ; set extruder temp to 90%

 

Have a look at my models on Printables.com 😉

Posted : 10/10/2020 4:58 pm
--
 --
(@)
Illustrious Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

And this gets into the variable/math syntax - but whether or not the Prusa firmware has implemented all this is another topic. Though, somewhere I have seen it does at least some of the variable handling.

https://gcodetutor.com/cnc-macro-programming/cnc-variables.html

Posted : 10/10/2020 6:18 pm
--
 --
(@)
Illustrious Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

Oh - and this is also quite helpful: https://manual.slic3r.org/advanced/conditional-gcode

Posted : 10/10/2020 6:26 pm
Area51
(@area51)
Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

The conditionals and expressions is evaluated by PS, not the firmware.

After reading your latest link on conditional- gcode this expression should work:

M104 S{0.9*[first_layer_temperature]} ; set extruder temp to 90%

Have a look at my models on Printables.com 😉

Posted : 10/10/2020 11:28 pm
bobstro liked
bobstro
(@bobstro)
Illustrious Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

Try this in your startup gcode:

M104 S{first_layer_temperature[0]*0.9} ; set no-ooze nozzle temp while bed heats

Note that PrusaSlicer/Slic3rPE syntax varies somewhat from the original Slic3r base.

I'm not sure why placeholders have to be used as vectors (first_layer_temperature[0]) some places and can just be used as simple single values (first_layer_temperature) in others, but PrusaSlicer is an odd beast.

Note that any math is done at slice time. The printer does not do any branching or calculation.

Edit: @area51 - Looks like we were typing at the same time. 😀 

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 10/10/2020 11:43 pm
towlerg
(@towlerg)
Noble Member
Topic starter answered:
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

I think, with no evidence, that some placeholders use vector format eg. (first_layer_temperature[0]) because may be different for each extruders.

Posted : 11/10/2020 5:02 pm
bobstro
(@bobstro)
Illustrious Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp
Posted by: @towlerg

I think, with no evidence, that some placeholders use vector format eg. (first_layer_temperature[0]) because may be different for each extruders.

Oh definitely, and it makes sense where you can conceivably have multiple extruders. I just don't know why gcode can use [first_layer_temperature] some places but must use [first_layer_temperature[0]] in others. 

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 11/10/2020 5:39 pm
towlerg
(@towlerg)
Noble Member
Topic starter answered:
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

@bobstro

Your syntax works a treat, thanks.

 

Posted : 11/10/2020 5:58 pm
bobstro
(@bobstro)
Illustrious Member
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp

Aha! Staring at the Prusa notes on PrusaSlicer gcode syntax, I answered my own question:

If used inside curly braces ({}), the "new" syntax requires specifying some values (mostly extruder-specific settings) as vectors. If used outside of curly braces, the "legacy" square bracket ([]) syntax can be used. So... [first_layer_temperature] or {first_layer_temperature[0]}. Not exactly intuitive, but at least there's a pattern to it.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 11/10/2020 6:12 pm
Share: