Maybe the reason why this happens is in machine G start code:
;===== machine: X1 =========================
;===== date: 20230130 =====================
;===== reset machine status =================
G91
M17 Z0.4 ; lower the z-motor current
G0 Z12 F300 ; lower the hotbed , to prevent the nozzle is below the hotbed
G0 Z-6;
G90
...
G91 sets to “relative” mode, which then follows by G0 Z12. If bed is already at lowest… then disaster follows.
EDIT: If my speculations are correct, then following modification should fix it:
;===== machine: X1 =========================
;===== date: 20230130 =====================
;===== reset machine status =================
;=== added by djeZo888 ======
G90
M17 Z0.4 ; lower the z-motor current
G0 Z30 F300
;=== end added by djeZo888 ===
G91
;M17 Z0.4 ; lower the z-motor current
G0 Z12 F300 ; lower the hotbed , to prevent the nozzle is below the hotbed
G0 Z-6;
G90
EDIT2: Not sure what would happen if you run this after power up, because printer doesn’t know location of Z at that time.