Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;======== P2S end gcode ==========
- ;===== 2026/03/13 =====
- ;===== detect ABS/ASA ======
- {if filament_type[current_extruder] == "ASA" || filament_type[current_extruder] == "ABS"}
- M400 ; wait for buffer to clear
- G92 E0 ; zero the extruder
- G1 E-1.2 F1800 ; retract 1.2mm filament
- G91 ; relative positioning
- G1 Z30 F900 ; lift 30 mm above current layer
- G90 ; back to absolute positioning
- G1 X128 Y128 F12000 ; move nozzle to middle of bed
- M104 S200 ; drop nozzle temp to 200°C immediately
- M106 P2 S0 ; set fan to 0%
- M140 S100 ; set bed temp
- M400 S300 ; pause for 300 seconds
- M140 S95 ; set bed temp
- M104 S190 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S90 ; set bed temp
- M104 S180 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S85 ; set bed temp
- M104 S170 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S80 ; set bed temp
- M104 S160 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S75 ; set bed temp
- M104 S150 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S70 ; set bed temp
- M104 S140 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S65 ; set bed temp
- M104 S130 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S60 ; set bed temp
- M104 S120 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S55 ; set bed temp
- M104 S110 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S50 ; set bed temp
- M104 S100 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S45 ; set bed temp
- M104 S90 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S40 ; set bed temp
- M104 S80 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S35 ; set bed temp
- M104 S70 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S30 ; set bed temp
- M104 S60 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S20 ; set bed temp
- M104 S40 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S15 ; set bed temp
- M104 S30 ; set nozzle temp
- M400 S300 ; pause for 300 seconds
- M140 S0 ; turn off bed
- M104 S0 ; turn off nozzle
- {endif}
- M400 ; wait for buffer to clear
- G92 E0 ; zero the extruder
- ; pull back filament to AMS
- M620 S65535
- T65535
- G150.2
- M621 S65535
- G150.3
- M400 ; wait all motion done
- M1002 judge_flag timelapse_record_flag
- M622 J1
- M991 S0 P-1 ;end smooth timelapse at safe pos
- M400 S5 ;wait for last picture to be taken
- M623 ;end of "timelapse_record_flag"
- M104 S0 ; turn off hotend
- M140 S0 ; turn off bed
- M106 S0 ; turn off fan
- M106 P2 S0 ; turn off remote part cooling fan
- M106 P3 S0 ; turn off chamber cooling fan
- M106 P10 S0 ; turn off left aux fan
- M400 ; wait all motion done
- M17 S
- M17 Z0.4 ; lower z motor current to reduce impact if there is something in the bottom
- {if (80.0 - max_layer_z/2) > 0}
- {if (max_layer_z + 80.0 - max_layer_z/2) < 256}
- G1 Z{max_layer_z + 80.0 - max_layer_z/2} F600
- G1 Z{max_layer_z + 78.0 - max_layer_z/2}
- {else}
- G1 Z256 F600
- G1 Z256
- {endif}
- {else}
- {if (max_layer_z + 4.0) < 256}
- G1 Z{max_layer_z + 4.0} F600
- G1 Z{max_layer_z + 2.0}
- {else}
- G1 Z256 F600
- G1 Z256
- {endif}
- {endif}
- M400 P100
- M17 R ; restore z current
- M220 S100 ; Reset feedrate magnitude
- M201.2 K1.0 ; Reset acc magnitude
- M73.2 R1.0 ;Reset left time magnitude
- M1002 set_gcode_claim_speed_level : 0
- M1015.3 S0 ;disable clog detect
- M1015.4 S0 K0 ;disable air printing detect
- ;=====printer finish air purification=========
- M622.1 S0
- M1002 judge_flag print_finish_air_filt_flag
- M622 J1
- M1002 gcode_claim_action : 66
- M145 P1
- M106 P2 S255
- M400 S180
- M106 P2 S0
- M623
- M622 J2
- M1002 gcode_claim_action : 66
- M145 P0
- M106 P3 S255
- M400 S180
- M106 P3 S0
- M623
- ;=====printer finish air purification=========
- ;=====printer finish sound=========
- M17
- M400 S1
- M1006 S1
- M1006 A53 B10 L50 C53 D10 M50 E53 F10 N50
- M1006 A57 B10 L50 C57 D10 M50 E57 F10 N50
- M1006 A0 B15 L0 C0 D15 M0 E0 F15 N0
- M1006 A53 B10 L50 C53 D10 M50 E53 F10 N50
- M1006 A57 B10 L50 C57 D10 M50 E57 F10 N50
- M1006 A0 B15 L0 C0 D15 M0 E0 F15 N0
- M1006 A48 B10 L50 C48 D10 M50 E48 F10 N50
- M1006 A0 B15 L0 C0 D15 M0 E0 F15 N0
- M1006 A60 B10 L50 C60 D10 M50 E60 F10 N50
- M1006 W
- ;=====printer finish sound=========
- M400
- M18
Advertisement
Add Comment
Please, Sign In to add comment