r/BambuLab • u/bfrancom17 • Apr 01 '26
Show & Tell P2S start/end g code for ABS/ASA prints! Chamber preheat and Cooldown sequence. Only activates when printing ABS/ASA. Huge quality and print success improvements.
Hi all. I posted a comment offering my start/end G-code for ABS/ASA print quality improvements in reply to someone asking about ASA related printing. I figured I would share it here as I got over 10 DMs requesting I share it when them too. Programming this into my printer absolutely changed the game for my ASA prints. This code will ONLY run when printing ABS/ASA - printing ANY other material will not trigger the preheat or cooldown sequence! Between the preheat and cooldown it adds about 2 hours to an ABS/ASA print but it's well worth it. We would of course not want this running on any other material for time and safety purposes.
What does this do?
It preheats the chamber for 45 minutes before printing ABS/ASA materials, which will significantly improve print quality. I am seeing chamber temps of ~52c at the end of the preheat in an ambient room temp of ~75f. Temps will reach 55c very early in the print. This is also with my exhaust/fume extraction system running at low speeds just enough to pull a little negative pressure in the chamber. You will likely see slightly higher temps than I do if you aren't extracting air during the preheat.
It will also slowly ramp down the build plate temp (and therefore chamber temps) after a print completes. It will ramp down from 100c at an interval of 5c every 5 minutes until a temperature of 15c. This will help ensure your ABS/ASA prints do not warp or crack.
The only other thing changed in the code is that it tells the aux fan to not run as aggressively during the pre-print phase when in heating mode which is triggered by ABS/ASA prints. We want the aux fan to run, but at a slow speed to gradually circulate the warm air. By default, it was BLASTING it causing heat loss due to the chamber not being perfectly sealed. I believe default was running the fan around 60 or 70% which is way too high. I have it set to 10% - just enough to make sure the chamber is evenly heated. At 60-70%, chamber temperature at the end of the 45 min preheat suffered majorly by up to 10c.
What all is modified?
This is 100% original G-Code from the March update for P2S printers - the only changes are to add preheating, end of print temp ramp-down, and the reduced aux fan speed during the pre-print phase while the printer is in heating mode for materials such as ABS/ASA.
Two Important Notes:
#1. This G-Code is good to go, ready to copy and paste for any P2S owners. Simply copy the G-Code in the respective start/end pastebin links, and replace your entire G-Code with the modified version.
#2. In the event of Bambu Lab updating the printer G-code - if you want the newer G-Code that is released, you will have to inject the changes I have made into their new updated code. I have made a log of my changes and where to put them, line by line. This will be listed below. In the event of an update, just add my changes (clearly documented on where to add them for both start/end g-code) and save it as a new printer profile! You will retain the changes I've made, and also get the updated printer code.
Links:
Full G-Code replacement based on newest March G-Code: Ready to paste and overwrite ALL G-Code for any P2S owner
Start G-Code: https://pastebin.com/XhTbMpir
End G-Code: https://pastebin.com/0W5vbrxM
Raw changes I have made in the event of update: Simply add these changes to whatever update is released.
Start G-Code: https://pastebin.com/AhuUhc0S
End G-Code: https://pastebin.com/0WXyV8Cd
Additional note for any newbies: In the Bambu Slicer once you save your new G-Code profile, you will need to ensure it is selected for it to work! While in the Prepare tab, click your printer in the top left and select the G-Code profile you saved with my changes. You only really need to select this profile when printing ABS/ASA, however selecting it out of habit is fine - it will not act on any of my changes unless ABS/ASA are being printed. If you just leave the printer profile to default the preheat and cooldown will not run. I select it every print out of habit!
7
u/shrx Apr 01 '26
Nice work. I suggest sharing the code on a version-controlled repository like Github though, it will be much easier to maintain and keep track of changes when new versions of stock G-code are released over time.
2
u/Helmold_ Apr 19 '26
Thanks, exactly what I was looking for today, after printing ASA for the first time yesterday.
Changes to the G-Code with the last update (BambuStudio 2.6.0.51):
Line 70 is now in Line 79
1
u/nroro Nov 03 '26
How do you make negative pressure keeping heat with low fan speed? Do you need to seal the chute and the panel next to the chute (old exhuasting fan panel)?
1
u/embiggenoid Apr 01 '26
Reasonably irrelevant question -- did you have a redirector/diffuser on the aux fan, or was it stock?
...just wondering if I need to mull adapting the aux fan settings since I'm using a diffuser. Not a big deal, just wondering.
1
u/huggernot Apr 01 '26
Question. Wapring is caused by the print cooling down at different rates.
Wouldn't prolonging the heat bed cool down, just create a greater heat differential and cause worse warping?
The only thing that I can see it doing is stopping the contraction of the initial layer that releases the print from the plate
1
u/flcbrguy Apr 01 '26
Any experts care to share what would need to be edited for this to run on a p1s?
1
u/Relative_Surround_20 H3C (on order) + H2D + P2S + Multiple AMS Tower Apr 03 '26
What a solid, thoughtful community contribution—exactly the kind of practical, experience-driven share that makes these forums so useful. Thank you for sharing your work.
For the last two weeks, I have been in an "expectant" mode where I have ordered the external exhaust fan kit, bought the engineering plate, drying the ASA, etc. prior to my first attempt to print an "engineering filament" next week. I had already given some thought to warm up and cool down periods that would be needed. I am curious though how you came up with these intervals? A 45-minute warm-up seems aggressive. In addition, such a delayed, regimented cooldown may be overkill for smaller parts. What are you typically printing with ABS/ASA? The reason I ask is to perhaps better understand your thinking.
1
u/chromebookdud Apr 10 '26
This works so good, I need to do it for PET-GF too! I think the ASA heat up time/cool down could be cut down to 25min each side without too much issue so I'll try that out soon. Thanks for the inspiration!
1
u/OwNeD162 Jun 01 '26
Hey u/bfrancom17 just wanted to come on here and say a big THANK YOU!
Had tried an ABS-GF print with Bambu defaults and had corner lifting, which then caused the top to fail later on as the hotend was striking the print.
Using your G-Code the print came out beautifully, as easy as printing PLA. I really appreciate it!
3
u/responds-with-tealc Apr 01 '26
i did basically the same thing recently, but on shorter timeframes. i really wish the chamber temp command worked in conjunction with passive build plate heating instead of just relying on long pauses, but it is what it is.
suggestion: add an additional different sound when your routine is triggered. the audible cue is nice to confirm it has correctly started a preheat
1
u/chromebookdud Apr 01 '26
Perfect timing, starting a project with large ASA clamshell cases for flyrods! A few minutes of preheat in a cold garage will make a huge difference
1
u/Regular_Apartment824 Jun 10 '26
i like that approach and added it to my P2S as DEV-ASA Modell - i like the heating and cooldown thingalots, just two questions - i thought that i can do a while ... do loop for the chamber temperature instead of hardcoding time - which is not supported (yet?) by BL - and tried to change or replace the time to warm up of 45min to chamber temperatur, i've seen m141 as parameter (and selected 48C) as well as M191 to get the chamber temperatur - should work, but it didn't. Does anyone has an idea?
besides - thanks for sharing your gcode u/bfrancom17