I’m trying to do some temperature calibration, using the M104 command to change hot-end temperature on the fly between layers/sections of the tower.

It consistently waits a few seconds for the temperature to stabilize whenever I trigger an M104 command.

I have inserted my gcode in the “before layer change” section, it looks like this

{if layer_z >= 1.05} M104 S220 {endif}
{if layer_z >= 11.05} M104 S225 {endif}
(etc.)

With different layer_z values for the different temperature sections up to 260°C

I can’t find anything in the marlin documentation that would cause this, only M109 should trigger the waiting AFAIK?

I have checked the generated gcode, and it only uses M104 commands.