BBL P1S organized start and end gcode

Just tried it, great changes. I’m really happy with it overall. Thanks a bunch! I’ll reach out if I see any issues or have suggestions that others may benefit from.

1 Like

I just found this thread and tried using your V6 start/end codes in the Machine G-code section of printer settings in Orca Slicer with my P1S using a 0.6mm nozzle and textured PEI plate but the first layer is printing way too high and not sticking to the bed, even with doing a bed leveling. I reverted back to the original gcodes and it’s working properly again.

Did I miss a step somewhere?

Hey,

You should adjust the Z Offset to your need in this section:

Its -0.05 for the textured plate and 0.0 for the smooth plate. To be honest I use -0.05 for all my plates. You can check what’s value is in your original code and put it in the optimized code.
I forgot to inform, that I tested only with 0.4 nozzle.

As I wrote: optimize it to your own need :slight_smile:

There’s something i’ve been trying to figure out from the machine-start code. I’d like to have the exact coordinates where the nozzle touches the bed during bedleveling. I’d like to exclude them from the buildplate.

I’ve been trying to print some smallprint and then switching to another filament to zhop around the small print. Right now I’m gambling so the nozzle doesnt touch the letters during bedleveling. Ive been lucky , but if I had the coordinates I could exclude them from the plate and get a nice warning when I accidentally put something under there.

Before I continue trial and erroring till infinity, does anyone know the exact coordinates?

The right value here, for reference, seems to be -0.03 for Textured PEI. I did a few test color change prints with a 0.6mm ObXidian nozzle with the optimized start/end code and filament change code and -0.03 came out perfect.

1 Like

The coordinates are somewhere in the firmware. So I don’t know the positions. But you can print without bed leveling and even without homing if you don’t switch off the printer and be fast enough. There is a time in the firmware between end of print and switch off motors. I do it often with the 0.8mm nozzle because there is very likely a blob at the nozzle which prevents a good homing.

I do the same when I want to embed lettering or logo in the first layers and my issue is just homing. When doing that (because I have no AMS), I do 2 things, 1. I add a temporary primitive cylinder of 2x2x2 in bambu studio with my logo that I place at X/Y 128/128 (where the homing should take place) and check that it actually not touch the logo. 2. I perform a check doing a homing before I print the model that goes over it because I found out at least on one of my instances that although homing should be done a X/Y 128/128, I had to slightly move the logo 2mm in Y direction because it actually hit it, not sure why. That takes care of homing but not bed levelling though. To counteract this, I deselect bed levelling when printing but if I change the plate, I launch the print with levelling and wait prior for the printer to actually start the print to stop it. I then restart the actual print but this time without bed levelling.

How are AMS filaments labeled? do they start at 0?
And you do change it where it says “[initial_extruder]” right?

Filament change is a different part/different section. I have only start and stop gcode.
Anyway I guess the filamentsy are labelled from 0 to whatever you have. I copied the AMS section from original gcode.
The M620.xxx and M620.xxx codes seems to be the AMS codes.
If you slice your object you can take a look to the gcode because some value will be changed from the slicer. Example T[initial_extruder] is after slicing T230 (or other number).
Hope it helps you a little.

Thanks for this. I’m new to 3d printing and am starting to print RC planes and need to send raw GCode I get from the plane’s creator. Adding the specific startup info for my P1S should help.

One question - I see a section called “Prepare AMS” What do I need to change to get to the third real in my AMS (the one with the LW-PLA used for planes)?

;===== prepare AMS ==========
M1002 gcode_claim_action : 4
M620 M
M620 S[initial_extruder]A ; switch material if AMS exist
G1 X120 F12000
T[initial_extruder]
G1 X54 F12000
G1 Y265
M400
M621 S[initial_extruder]A
M620.1 E F{filament_max_volumetric_speed[initial_extruder]/2.4053*60} T{nozzle_temperature_range_high[initial_extruder]}

Thanks in advance.

Hi, you know what doesn’t work for me. The machine is too high or the coordinates hang sometimes at startup.

Firmware P1S: 01.06.01.00

sir I encountered some problems.I want my P1S to have the mcboard fan work when printing ABS and turn off when printing PLA .Because I have made a PTC chamber heater, I want to use the MC fan port as a signal line to control the start and stop of the heater.The heater starts and stops with printing.But I found that after deleting this code M701 A1 S255, the fan is still rotating.Only joining M710 S0 to G-code,the fan stop.I tried to write a command myself {if filament_type[initial_extruder] == “ABS”}
M710 A1 S255 ;turn on MC fan
{else}
M710 S0 ;
{endif}
It doesn’t work,I don’t know how to modify it to achieve the functionality I want

Hi! Do u have the original start and end codes by any chance?
Im new to this and want to try the original setting first. But cant find it…
I saw that u have full controll on this so fingers crossed.
I have saved your codes for later use😊 tnx

-Mr soder

Anyone figured out what M142 does?
I try to look it up, but I found 2 possbile options

  • Set Cooler Temperature (Fast)
  • Holding Pressure

It’s firmware/manufacturer dependant I think,

It is currently in the Filament start gcode for ‘Bambu PLA Basic’

Example: M142 P1 R35 S40

I got this error when I tried to use the start g-code, the quotations in {if curr_bed_type==“Textured PEI Plate”} were directional qoutes so I had to change them to normal qoutes

Failed to generate G-code for invalid custom G-code.
machine_start_gcode Parsing error at line 134: Not a variable name
{if curr_bed_type==“Textured PEI Plate”}