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?
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 😉
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
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
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 😉
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. 😀
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
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.
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.
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.
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
RE: PS syntax for nozzle temp to wait at 90% till bed up to temp
@bobstro
Your syntax works a treat, thanks.
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.
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