custom g-code for bambu lab p1s and p2s

the wipe g-code i use on my bambu lab p1s and p2s, step by step. free, copy-paste ready.

November 19, 2026
custom g-code for bambu lab p1s and p2s in bambu studio

this is the custom g-code i use on my bambu lab p1s and p2s. it parks the nozzle at the wiper and gives it a few proper wipes mid-print. works in both bambu studio and orcaslicer.

important: this code is tailor made for these specific printers. do NOT use it on any other printer, the coordinates are printer-specific. stay near your printer when you test it. i'm not responsible for any misuse of the code, use it at your own responsibility.

step 1

open bambu studio or orcaslicer and insert your stl/object. in this example i just use a cone.

model loaded on the plate in bambu studio

step 2

slice.

step 3

copy the g-code for your printer below.

p1s:

G1 X60 Y264 F15000 ; move to nozzle wipe position
G1 X100 F5000 ; wipe right
G1 X70 F15000 ; wipe left
G1 X100 F5000 ; wipe right
G1 X70 F15000 ; wipe left
G1 X100 F5000 ; wipe right
G1 X70 F15000 ; wipe left
G1 X100 F5000 ; wipe right
G1 X70 F15000 ; wipe left
G1 X60 F5000 ; clearance

p2s:

G0 X55.1 Y240 F20000 ; in front of chute
G0 Y270.5 ; into chute (wiper position)
G91 ; relative
G0 X40 F10000 ; wipe
G0 X-21 F10000
G0 X21 F10000
G0 X-21 F10000
G0 X21 F10000
G0 X-40 F10000
G0 Y-30.5 F15000 ; drive out of chute
G90 ; back to absolute

step 4

drag the vertical slider down to 3 or 4 layers and right-click the plus icon (the little ball). click 'add custom g-code'.

vertical layer slider dragged down to layer 5 right-click menu with add custom g-code

step 5

paste your g-code. again: the code is printer-bound, so don't use the p1s code on any other printer.

custom g-code window with the wipe code pasted

step 6

print.

print plate button

step 7

be AT your printer to check it works. if it does, you can add as many wipes as you want/need: move the vertical layer slider up, right-click, add custom g-code, etc.

done. happy printing <3

Veröffentlicht  

get the free pdf 👇

it's free. leave your email and the pdf is yours, right away. the full explanation is below.

you'll also get new free files when i make them + the odd crap update. unsubscribe whenever.