More minor but useful modifications
I noticed that during the first print after startup, the first layer was almost always unsatisfactory; however, when I preheated the bed, it improved. So, I added a delay before Z-axis homing to let thermal expansion do its thing. This extends the start slightly, but it is still shorter than the original factory G-code. Of course, this time can be modified if someone wants to experiment. Furthermore, my version does not consume kilometers of filament (purging old, loading new, etc.), using it only for the needs of the optional calibration.
I also made a list of the first 60 codes displayed by the P2S using the “M1002 gcode_claim_action : x” command (useful for those who like modifications and tinkering with G-code). If there is interest, I will publish it. The ones available online often have discrepancies.
;======== P2S quick start printing GCODE (V7.3) ==========
;
; Author of the modification: SylwekK
;
; G-code start sequence tested with a non-AMS printer
; Quick start: Printing begins around 2 minutes after selecting the model
; The printer does not purge filament unnecessarily as it does during a filament change.
; Features: Optional flow calibration and bed leveling active
; Verified and tested but use at your own responsibility
;
M140 S[bed_temperature_initial_layer_single] ; Heat heatbed first (Code 2)
M993 A0 B0 C0
M17
M620 M
G389
;===== Initial safety Z-axis drop =====
G91 ; Relative positioning
G1 Z10 F1200
G90 ; Absolute positioning
;===== Reset machine status =================
M204 S10000
M630 S0 P1
G90
M17 D
M220 S100
M1002 set_gcode_claim_speed_level: 5
G29.1 Z{+0.0}
M983.1 M1
M982.2 S1
M983.4 S0
;===== Reset machine status =================
;==== Heating to 140C and XY homing ====
M1002 gcode_claim_action : 13 ; Status: Homing (XYZ Homing)
M104 S140 A
G28 X T300 ; Home XY
G29.2 S0
;===== Filament sensor arming =====
M620 S[initial_no_support_extruder]A
T[initial_no_support_extruder]
M621 S[initial_no_support_extruder]A
G389
;===== Heatbed Thermal Stabilization (Soak) =====
M1002 gcode_claim_action : 58 ; Status: Temperature equalization for optimization
{if filament_type[initial_no_support_extruder] == “PLA”}
G4 S20 ; Wait 20s for PLA bed stability
{else}
G4 S45 ; Wait 45s for high-temp materials (PETG/ABS/ASA)
{endif}
;===== Nozzle cleaning at 140C =====
M1002 gcode_claim_action : 14 ; Status: Cleaning nozzle tip
G150.3
M109 S140 A
G150.1 F8000 ; Wipe
G150.1 F8000 ; Wipe repeat
M400
;===== Z homing =====
G1 X128 Y128 F30000 ; Move to bed center
M1002 gcode_claim_action : 13 ; Status: Homing (Z-axis Homing)
G28 Z P0 T400
M400
;===== Optional Auto Bed Leveling (ABL) =====
M1002 judge_flag g29_before_print_flag
M622 J1
M1002 gcode_claim_action : 1 ; Status: Auto Bed Leveling
M190 S[bed_temperature_initial_layer_single]
M109 S140 A
G29 A1 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} I{first_layer_print_size[0]} J{first_layer_print_size[1]}
M400
M500 ; Save calibration data
G1 Z10 F1200
M623
;===== Mech mode resonance sweep =====
M1002 gcode_claim_action : 3 ; Status: Vibration Compensation
G90
G1 X128 Y128 F20000
G1 Z5 F1200
M400 P200
M970.3 Q1 A5 K0 O1
M970.2 Q1 K1 W74 Z0.01
M974 Q1 S2 P0
M970.3 Q0 A7 K0 O1
M970.2 Q0 K1 W74 Z0.01
M974 Q0 S2 P0
M400
;===== Optional Flow calibration =====
M975 S1
M1002 judge_flag extrude_cali_flag
M622 J1
M1002 gcode_claim_action : 8 ; Status: Extrusion Calibration
G150.3
M109 S[nozzle_temperature_initial_layer]
G4 S20 ; Nozzle pressure stabilization pause
M211 X0 Y0 Z0 ; Disable soft endstops
M975 S1 ; Enable Input Shaping
G29.2 S0
{if ((filament_type[initial_no_support_extruder] == “PLA”) || (filament_type[initial_no_support_extruder] == “PLA-CF”) || (filament_type[initial_no_support_extruder] == “PETG”)) && (nozzle_diameter[initial_no_support_extruder] == 0.2)}
M620.10 A0 F74.8347 H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
M620.10 A1 F74.8347 H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
{else}
M620.10 A0 F{flush_volumetric_speeds[initial_no_support_extruder]/2.405360} H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
M620.10 A1 F{flush_volumetric_speeds[initial_no_support_extruder]/2.405360} H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
{endif}
M620.11 P0 L0 I[initial_no_support_extruder] E0
M620.11 K0 I[initial_no_support_extruder] R0
M620 S[initial_no_support_extruder]A
M1002 set_filament_type:UNKNOWN
M400
T[initial_no_support_extruder]
M400
M628 S0
M400
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M621 S[initial_no_support_extruder]A
G29.2 S1
G90
M83
M400
M983.3 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4} A0.4 ; Flow calibration pattern
M400
M106 P1 S255 ; Parts cooling fan for calibration
M400 S5
M106 P1 S0
G150.3
M623
;===== Final heating before printing ==========
G150.3
M1002 gcode_claim_action : 7 ; Status: Nozzle heating
M190 S[bed_temperature_initial_layer_single]
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]}
M400
;===== Double filament cut and nozzle wipe =====
M629
M400 P200
M629
M400 P200
G150.1 F8000
M211 S1 ; Enable soft endstops
G29.2 S1 ; Enable ABL compensation
M400
;===== Z-OFFSET correction (Bed type dependent) =====
{if curr_bed_type==“Textured PEI Plate”}
G29.1 Z{0.01}
{else}
G29.1 Z{0.03}
{endif}
;===== Purge line start =====
M975 S1
M1002 gcode_claim_action : 51 ; Status: Printing calibration lines
G90
M83
G0 X100 Y0 F24000
G130 O0 X100 Y-0.2 Z0.6 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053} L40 E12 D4
G1 Z0.5
M400
;===== Activate all safety sensors =====
M1015.3 S1 H[nozzle_diameter]
M1015.4 S1 K1 H[nozzle_diameter]
M620.6 I[initial_no_support_extruder] W1
M1002 gcode_claim_action : 0 ; Status: Printing (Clear status)
G29.99
;— Load Cell Sensitivity & Monitoring —
M1010 Q0 B0.023 S0.01
M1010 Q1 B0.005 S0.01
M1010.1 S1
;======== END GCODE ==========