Layer hight specific g-code?
-
Hi *,
I have a problem which should be easy to solve but I do not know how again.
I want to setup the hotend temperature based on the layer hight but I do not know how to be honest. I think that a condition based on the hight of Z should do it. Can somebody please help me with an example?
Cheers, Chriss
-
@Chriss better to do this via gcode post processing in the slicer IMO.
-
@Chriss i agree with @oliof oliof, AFAIR Prusa slicer for example has the ability to do this.
If not then you could use the object model key
job.layer
to determine what layer your were on (assuming the slicer correctly labelled the layers) and then set a temperature in daemon.g. IMO that would be more work than setting the temps in the slicer to start with. -
@T3P3Tony There is more to do than only setting the temperature....I need to set the standby temps of the tools etc. I do not want to do that via the slicer, I try to make my printers as slicer agnostic as possible.
Anyway, to the practical thing.... would something like that work?
if move.axes.[2].machinePosition < 0.01 M116 S"Bla"
(I do not understand why this reports "bad command"...
Sorry, I do not want to discuss the best way om implementation, my question is more about how.
Cheers, Chriss
-
We can forget that.. I just learned that the "if" does not work via the serial interface.
if move.axes[2].machinePosition < 0.2 M118 S"TEST"
Worked as soon as I places it into a macro.
-
@Chriss fair enough.
So yes you could use the daemon.g to check if a job was being processed, if one was then set the temperature based on the Z axis position.
-
Thanks Tony, but I did it with the if in the tpost file finally. The idea was to change hotebd temp to the "first layer" temperature if Z is below 0.2 or something like that. SO it is a one time job in this case.
I had to learn that slicers like SuSi are not very good in dealing with more than one tool
Cheers, Chriss
-
@Chriss ok cool, yes on that case that would work