How to add X-Level to Gcode Header?

What command can I put at some location in Gcode header that will X-Level before each print?
I ask because TechSuppot suggested; “Also please try leveling the X-Axis with the correct LCD command before every print…”

Adding in the X level gcode to your start gcode in machine settings will get it preformed before every print. It is more than one command, but this should get you up and running the way you describe:

G28         ; Home Axis
G0 X160 F9999 ;move toolhead to right
G0 Z5 F6000 ; Move to bottom of printer
G91         ; Set relative motion mode
M211 S0	; Turn off soft endstops
M400 ; Finish moves
M906 Z600 ; Lower current to 600mA
G0 Z-15 F500 ; Skip steppers against lower Z mounts
G90 ; Return to absolute mode
M400 ; Finish moves
M906 Z960 ; Restore default current
M211 S1	; Turn soft endstops back on
M400 ; Finish moves
G28 ; Rehome
M117 X-Axis Leveled

We hope this helps!

Thanks for this. It’s been added to my Gcode header for many days, many prints.
This morning I printed what I think was a near perfect print.
I ran it a second time (w/ code to re-level x) and first layer printed very differently!
Like the nozzle was nearly touching the build plate… first layer super smooched/thin.

  • same clean nozzle
  • same profile

I know it shouldn’t, but could the code forced re-level have arrived at a different measure from nozzle-to-plate for second print?

Any thoughts on why this happened?

When you see inconsistencies when running the same gcode file, it will come down to the probe itself being slightly different. Either the nozzle was not completely clean, or some filament may have slightly dripped out when traveling causing interference in the probe. Looking at your other posts, this slight variance in probing will be much more noticeable on smaller nozzle sizes. Ensure you have a clean wiper pad installed to help minimize the variance.