One single Gcode command adds 4m10s onto my "Prepare time" estimate, but only takes a few seconds #622

Open
opened 2026-04-05 16:24:14 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Wegerich on 2/24/2026

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.3.20-beta2 7e63fce

Operating System (OS)

Windows

OS Version

W11

Additional system information

AMD Ryzen 5 PRO 6650U with Radeon Graphics (2.90 GHz)

Printer

MK4S with MMU3, 0.4mm Nozzle

How to reproduce

  1. Go to custom GCode > Start Gcode
  2. Add the line G0 Z10 F6000 before any other G1 or G0 commands (see Gcode attached)
  3. Slice a print
  4. Check the "line type" information

Actual results

The preparation time is changed from 23s in my case to 4m33s, just from this command.

Expected results

This Z move from the home position takes a few seconds.

I just timed a print not using that command, the prediction was 4m 51s including prep and the printer started off pretty warm and took 8 m 39 s including prep. Most of this time is mesh bed levelling, users could provide a rough value for (time_taken_for_full_bed_mesh) and then proportionally adjusted depending on model size.

I recognise it's "impractical" to predict infinite thermal curves, but almost all that time was spent probing the bed, which should be repeatable, indeed it's probably something people wouldn't mind timing and setting manually. (Confounded by only probing the active part of the bed nowadays but still).

Project file & Debug log uploads

model demonstrating funky prepare time prediction.zip

One project file and 2 gcodes (with and without)

Here is my full start Gcode

M17 ; Enable steppers
M140 S[first_layer_bed_temperature] ;Start bed heating
M109 S130; Hotend wait for 130, 
M104 S{nozzle_temperature_range_low[initial_tool] - 30};Ready for nozzle clean
M104 S{first_layer_temperature[initial_tool] - 20};Use with MMU because filament isn't loaded so can't ooze

;Adjust Extruder steps per mm
;No idea why such a large adjustment seems to be needed from the default 380, but I calibrated this very carefully
M92 E419

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Original prusa code;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Perform nozzle diameter check
M862.1 P[nozzle_diameter] ; nozzle check
; Check printer model
M862.3 P "MK4S" 
; Check G-code level
M862.5 P2 
; Check firmware features (Input shaper and MMU3)
M862.6 P "Input shaper" 
M862.6 P "MMU3" 
; Report firmware version
M115 U6.2.4+8909
; Configure MMU settings
M708 A0x0b X5   ; Set extra load distance
M708 A0x0d X140 ; Set unload feedrate
M708 A0x11 X140 ; Set load feedrate
M708 A0x14 X20  ; Set slow feedrate
M708 A0x1e X12  ; Set pulley current to ~200mA
M302 S155 ;Lower cold extrusion limit
M302 S{first_layer_temperature[initial_tool]-50} ;Lower cold extrusion limit

; Define mesh area based on print bed and first layer dimensions
M555 X{first_layer_print_min[0]-8} Y{first_layer_print_min[1]-8} W{first_layer_print_max[0] - first_layer_print_min[0]+8} H{first_layer_print_max[1] - first_layer_print_min[1]+8};

; Use absolute coordinates and extruder relative mode
G90 
M83

;Home axes
M84 E ; Turn off extruder motor
G28 ; home all without mesh bed level

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Original prusa code;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
M84 E ; Turn off extruder motor again

;Go to area where probling will start
M117 Moving to probing area
G0 Z10 F6000
G1 X{first_layer_print_min[0]-8} Y{first_layer_print_min[1]-8} F{initial_layer_travel_speed*60}

; without waiting for the bed to get completely to temperature
{if first_layer_bed_temperature[initial_tool]<=60}M106 S100; Enable fan if bed temperature is below 60{endif}
M190 S{first_layer_bed_temperature[initial_tool]-5}
M140 S[first_layer_bed_temperature] 
M107; Disable fan once bed temp has been reached

;Do a new mesh
M84 E ; turn off E motor
G29 H0.3 P1; invalidate mbl & probe print area
G29 P3.2 ; interpolate mbl probes
G29 P3.13 ; extrapolate mbl outside probe area
G29 A ; activate mbl

; Prepare by moving to a safe position
G0 X0 Y-4 Z30 F4800 
M109 S{first_layer_temperature[initial_tool]-10};Wait for extruder heat to load filament
M104 S{first_layer_temperature[initial_tool]} B{first_layer_temperature[initial_tool]-10};;Now do full heat

;Set retraction settings
M207 F{retraction_speed*60} S{retraction_length}
M208 F{deretraction_speed*60} S{retraction_length}

; Load filament to the nozzle
T[initial_tool]
M117 Tool is T[initial_tool]
G0 E{parking_pos_retraction + extra_loading_move - cooling_tube_length} F1000 
;load close to the nozzle E parking pos_retraction + extra loading_move -cooling_tube_length
G0 E{cooling_tube_length*0.66} F1000 ; load to the nozzle

; Reset extruder position and set extruder mode
G92 E0
M569 S0 E 

;Go close to print, ready for a little purge
G0 Z0.4 X{first_layer_print_min[0] - 12} Y{first_layer_print_min[1] - 2} F6000

M117 Countdown start
M400 ;Finish moves before beeping
; Race Start Countdown
M300 S440 P150 ; Beep 1 (Low)
G4 P850        ; Wait 850ms
M300 S440 P150 ; Beep 2 (Low)
G4 P850        ; Wait 850ms
M300 S440 P150 ; Beep 3 (Low)
G4 P850        ; Wait 850ms
M300 S880 P400 ; GO (High)

;purge
G92 E0 ; Reset extruder again for main print
G0 Z0.333 F1000
G1 X{first_layer_print_min[0] - 1} E{cooling_tube_length*0.3333} F100
G10 ;retraction to break PETG stringing
G1 Z1 Y{first_layer_print_min[1] - 3} F1000
G1 Y{first_layer_center_no_wipe_tower[1]} F{travel_speed*60};go closer to print start point
G11 ; Deretraction
G90 ;All axes absolute
M83 ; Extruder relative

Checklist of files to include

  • Log file
  • Project file

Anything else?

No response

*Originally created by @Wegerich on 2/24/2026* ### Is there an existing issue for this problem? - [x] I have searched the existing issues ### OrcaSlicer Version 2.3.20-beta2 7e63fce ### Operating System (OS) Windows ### OS Version W11 ### Additional system information AMD Ryzen 5 PRO 6650U with Radeon Graphics (2.90 GHz) ### Printer MK4S with MMU3, 0.4mm Nozzle ### How to reproduce 1. Go to custom GCode > Start Gcode 2. Add the line `G0 Z10 F6000` before any other G1 or G0 commands (see Gcode attached) 3. Slice a print 4. Check the "line type" information ### Actual results The preparation time is changed from 23s in my case to 4m33s, just from this command. ### Expected results This Z move from the home position takes a few seconds. I just timed a print not using that command, the prediction was 4m 51s including prep and the printer started off pretty warm and took 8 m 39 s including prep. Most of this time is mesh bed levelling, users could provide a rough value for (`time_taken_for_full_bed_mesh`) and then proportionally adjusted depending on model size. I recognise it's "impractical" to predict infinite thermal curves, but almost all that time was spent probing the bed, which should be repeatable, indeed it's probably something people wouldn't mind timing and setting manually. (Confounded by only probing the active part of the bed nowadays but still). ### Project file & Debug log uploads [model demonstrating funky prepare time prediction.zip](https://github.com/user-attachments/files/25500003/model.demonstrating.funky.prepare.time.prediction.zip) One project file and 2 gcodes (with and without) Here is my full start Gcode ``` M17 ; Enable steppers M140 S[first_layer_bed_temperature] ;Start bed heating M109 S130; Hotend wait for 130, M104 S{nozzle_temperature_range_low[initial_tool] - 30};Ready for nozzle clean M104 S{first_layer_temperature[initial_tool] - 20};Use with MMU because filament isn't loaded so can't ooze ;Adjust Extruder steps per mm ;No idea why such a large adjustment seems to be needed from the default 380, but I calibrated this very carefully M92 E419 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Original prusa code;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Perform nozzle diameter check M862.1 P[nozzle_diameter] ; nozzle check ; Check printer model M862.3 P "MK4S" ; Check G-code level M862.5 P2 ; Check firmware features (Input shaper and MMU3) M862.6 P "Input shaper" M862.6 P "MMU3" ; Report firmware version M115 U6.2.4+8909 ; Configure MMU settings M708 A0x0b X5 ; Set extra load distance M708 A0x0d X140 ; Set unload feedrate M708 A0x11 X140 ; Set load feedrate M708 A0x14 X20 ; Set slow feedrate M708 A0x1e X12 ; Set pulley current to ~200mA M302 S155 ;Lower cold extrusion limit M302 S{first_layer_temperature[initial_tool]-50} ;Lower cold extrusion limit ; Define mesh area based on print bed and first layer dimensions M555 X{first_layer_print_min[0]-8} Y{first_layer_print_min[1]-8} W{first_layer_print_max[0] - first_layer_print_min[0]+8} H{first_layer_print_max[1] - first_layer_print_min[1]+8}; ; Use absolute coordinates and extruder relative mode G90 M83 ;Home axes M84 E ; Turn off extruder motor G28 ; home all without mesh bed level ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Original prusa code;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; M84 E ; Turn off extruder motor again ;Go to area where probling will start M117 Moving to probing area G0 Z10 F6000 G1 X{first_layer_print_min[0]-8} Y{first_layer_print_min[1]-8} F{initial_layer_travel_speed*60} ; without waiting for the bed to get completely to temperature {if first_layer_bed_temperature[initial_tool]<=60}M106 S100; Enable fan if bed temperature is below 60{endif} M190 S{first_layer_bed_temperature[initial_tool]-5} M140 S[first_layer_bed_temperature] M107; Disable fan once bed temp has been reached ;Do a new mesh M84 E ; turn off E motor G29 H0.3 P1; invalidate mbl & probe print area G29 P3.2 ; interpolate mbl probes G29 P3.13 ; extrapolate mbl outside probe area G29 A ; activate mbl ; Prepare by moving to a safe position G0 X0 Y-4 Z30 F4800 M109 S{first_layer_temperature[initial_tool]-10};Wait for extruder heat to load filament M104 S{first_layer_temperature[initial_tool]} B{first_layer_temperature[initial_tool]-10};;Now do full heat ;Set retraction settings M207 F{retraction_speed*60} S{retraction_length} M208 F{deretraction_speed*60} S{retraction_length} ; Load filament to the nozzle T[initial_tool] M117 Tool is T[initial_tool] G0 E{parking_pos_retraction + extra_loading_move - cooling_tube_length} F1000 ;load close to the nozzle E parking pos_retraction + extra loading_move -cooling_tube_length G0 E{cooling_tube_length*0.66} F1000 ; load to the nozzle ; Reset extruder position and set extruder mode G92 E0 M569 S0 E ;Go close to print, ready for a little purge G0 Z0.4 X{first_layer_print_min[0] - 12} Y{first_layer_print_min[1] - 2} F6000 M117 Countdown start M400 ;Finish moves before beeping ; Race Start Countdown M300 S440 P150 ; Beep 1 (Low) G4 P850 ; Wait 850ms M300 S440 P150 ; Beep 2 (Low) G4 P850 ; Wait 850ms M300 S440 P150 ; Beep 3 (Low) G4 P850 ; Wait 850ms M300 S880 P400 ; GO (High) ;purge G92 E0 ; Reset extruder again for main print G0 Z0.333 F1000 G1 X{first_layer_print_min[0] - 1} E{cooling_tube_length*0.3333} F100 G10 ;retraction to break PETG stringing G1 Z1 Y{first_layer_print_min[1] - 3} F1000 G1 Y{first_layer_center_no_wipe_tower[1]} F{travel_speed*60};go closer to print start point G11 ; Deretraction G90 ;All axes absolute M83 ; Extruder relative ``` ### Checklist of files to include - [ ] Log file - [x] Project file ### Anything else? _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#622