;Make sure position steppers stay powered on to lock position
M17 Z X Y
;Unlock the extruder stepper so we can use the dial
M84 E
Well, the script is doing some overkill. The M17 command is not required at all, since the motors were already used by the printer there is no need to lock them. This is obsolete.
M18 and M84 are the same command, but they may not be implemented both, even so they share the same code. I used M18 in all my old crappy Marlin 1 firmwares, so I guess it is always there.
To avoid any troubles i would remove those lines above and use just
M18 S9999 ; set overall timeout to 9999 seconds to prevent xyz getting loose during pause.
M18 E ; unlock the extruder
The two minutes delay you are experiencing are the 120 second build into Marlin by default. Using the “S9999” prevents the printer from unlocking the motors within the next 9999 seconds, which should be enough for a pause and filament change, while a 120 second delay is more on the short end. This is important as the printer remembers the location of the print head and if you accidentally move the head 1mm to any side, the print will get an 1mm layer shift in the very same direction. That is why you want to lock XY and z in any case.
Also the temperature has nothing to do with this command. This is all about the motor. The temperature is only important if you want to extrude something. In that case the firmware will not engage the motor when the hotend is cold, to prevent pushing filament against a cold heater block. You as a human can try this as any time, as no real harm is done unless you have super powers. Without super powers the wheel will not turn, when the hotend is cold.
The “M18 E” above just unlocks the active extruder motor.
The M18/84 commands are a little “broken”. You cannot set the timeout and unlock the motor in the same run, which is kind of stupid. That is why I did the two commands above instead of using them in one line.
You should be able to test this in the terminal of octo print
Use
M17 E
and the extruder motor is blocking
M18 E
should unlock it immediately and free the turn wheel.
When the extruder is cold you may not be able turn the extruder wheel, even when the motors are unlocked. This is because the filament inside the heater forms a blob, which prevents it from getting out. Same for the other direction. 1.75mm filament does not fit though a 0.4 diameter nozzle, when the hot end is cold. Thats why heating the hotend is a must in any case before using the extruder by firmware and motor or by hand.