Increasing Print Speed for multiple layers / all of a print using GCode
Hello all,
I am wanting to automate increasing the print speed to 250% for some prints I will be mass producing on my Mini+.
Whilst this function exists on the LCD Screen - Tune - Speed, I am having some trouble locating a suitable GCode.
I see I can add an M220 for a single layer instruction, but I am wanting to do this for all layers with the exception of the first.
I inserted this as my layer height is 0.30mm in "Printer Settings" > "Custom G-Code" > "Before Layer ending G-Code" after ";BEFORE_LAYER_CHANGEG92 E0.0;[layer_z]":
"M220 S{if layer_z < 0.30}100{else}250{endif} ; M220 adjusts feed rates to 250% at 0.30mm height"
but had no success.
Could someone please advise how I can achieve the above.
Many thanks in advance 😀
Andrew
RE:
M220 feed rates are active until something else comes along and changes them (or the printer is power cycled).
Try layer_num
So if you had used M220 S{if layer_num = 1}100{else}250{endif} ; it will (probably) work. I'm not at home at the moment so cant easily check.
You also could have just added one to the after layer change field in your printer settings. M220 S250 That would add one after all layers, so it wouldn't apply to the first layer but would all others.
You would have also had to add into your start gcode to set it back to M220 S100 though otherwise if you ran consecutive prints it would apply on the first layer of the second due to them being persistent until changed.
Both methods should give what you want.
RE: Increasing Print Speed for multiple layers / all of a print using GCode
Had a chance to get to a PC, if you add into your before layer change section
M220 S{if layer_num > 0}100{else}250{endif} ; that will do a M220 S100 on the first layer (layer zero) and M220 S250 on all others.
RE: Increasing Print Speed for multiple layers / all of a print using GCode
Many thanks - I will try tonight. 😀
RE: Increasing Print Speed for multiple layers / all of a print using GCode
I have tested this conditional GCode and I think the condition must be reversed.
M220 S{if layer_num < 1}100{else}250{endif}
I have checked this after slicing - select "speed" in the "Legend" Dialog