In case I lose it, some details about my current Neptune 2 printer gcode:

G28 ; home all axes
M104 S170 ; heat the nozzle
M140 S60 ; heat the bed
M109 S170 ; wait for nozzle temp
M190 S60 ; wait for bed temp
G28 ; home all axes
G29; run bilinear probing
M500 ; Save Settings To epromm
M420 S1 V1 ; Restore and report Bed Mesh
M140 S{material_bed_temperature_layer_0} ;Start heating bed
M104 S{material_print_temperature_layer_0} ;Start heating extruder
M190 S{material_bed_temperature_layer_0} ;Wait for bed to reach temp before proceeding
M109 S{material_print_temperature_layer_0} ;Wait for extruder to reach temp before 
G92 E0 ;Reset Extruder
G1 Z10.0 F3000 ;Move Z Axis up
G1 Z4.0 F3000 ;Move Z Axis up
G1 X1.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X1.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X1.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X1.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up

Broken down into sections, that’s:

G28 ; home all axes

This is an initial “get somewhere known” move. With the BLTouch fitted it leaves the head in the middle of the bed after the Z axis homes. Not great, not terrible. I might swap this out for a G28 Z; G28 X Y so it doesn’t leave the head in the middle of the bed for the next bit.

M104 S170 ; heat the nozzle
M140 S60 ; heat the bed
M109 S170 ; wait for nozzle temp
M190 S60 ; wait for bed temp

This is pretty much what the Prusa MINI does, so I nicked it on the basis that it’s likely to be sensible. I think the logic is that you mostly want the bed up to temp because that’s the bit that’s going to expand the most, but you also want the nozzle hot in case it affects the sensor. I’m not sure why 170 degrees though - it might just be “eh, close enough” for most PLA brands without causing drooling.

One other note on this: I quite often see examples where the middle two commands in this sequence are the other way round. That is, heat the nozzle, wait for the nozzle, heat the bed, wait for the bed. That’s obviously slower than it needs to be, there’s no reason you can’t heat both at once and there’s no reason you should need to do one wait before the other.

Moving on…

G28 ; home all axes
G29; run bilinear probing
M500 ; Save Settings To epromm
M420 S1 V1 ; Restore and report Bed Mesh

This G28 is a re-home after heating everything up, and is for precision. Mostly X and Y, because we’re about to re-do Z. I have no idea if it has a measurable effect.

G29 is where the BLTouch magic happens. When this has finished, the screen on the Neptune 2 will show the Z-adjust screen, which will remain there for the course of the print. Do not press Back, or the head will re-home mid-print. It should carry on with the print after that, but you’ll get a stop/start blob wherever the head happened to be and you don’t need to bother with anything else on the screen because you’re driving everything through Octoprint. I’m not strictly certain that the M500; M420 S1 V1 sequence is necessary after a G29 except that it might come in handy in a post-power-outage restart.

M140 S{material_bed_temperature_layer_0} ;Start heating bed
M104 S{material_print_temperature_layer_0} ;Start heating extruder
M190 S{material_bed_temperature_layer_0} ;Wait for bed to reach temp before proceeding
M109 S{material_print_temperature_layer_0} ;Wait for extruder to reach temp before 

Again taking our cue from the Prusa MINI, this is where we get up to printing temperature. And again, these commands are in a different order than you’ll see in online examples because those examples haven’t had much thought go into them. The variable names can be found in a file which, on my machine, lives at C:\Program Files\Ultimaker Cura 4.11.0\resources\definitions\fdmprinter.def.json.

Then we have the swipe to charge the nozzle:

G92 E0 ;Reset Extruder
G1 Z10.0 F3000 ;Move Z Axis up
G1 Z4.0 F3000 ;Move Z Axis up
G1 X1.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X1.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X1.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X1.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder

I’m not 100% happy with this: the feed rates are pretty arbitrary, it’s close enough to the edge that I worry about it missing the bed if I don’t align it well, and I don’t think there’s any reason for the second line, but it’s not something I’ve changed from the default yet.

The first G92 E0 tells the extruder that no matter where it thinks it was starting from, it’s now at position 0; the second one at the end is so that the remainder of the print’s gcode doesn’t need to take the swipe extrusion into account.

And that just leaves us with…

G1 Z2.0 F3000 ;Move Z Axis up

This leaves the head 2mm above the bed so on the off chance there’s something in the way (maybe some crap on the bed from a previous print, if I’ve not quite cleaned it well enough) the head doesn’t crash into it as soon as the print proper starts.

And that’s it. I’ve not messed with the end code, but I don’t think there’s much I’ll want to do other than lift the Z axis further clear on completion. It really bugs me how printers just leave the head in the way of getting the bed off. But that’s a problem for another day.