X Axis Auto Level

When Workhorse first starts it auto levels the X Axis. Anyone know the gcode to accomplish this?
I’ve loaded firmware for BLTouch and it doesn’t do the auto level at start.

Normally, G34 would do this. But looks like Lulzbot didn’t use that feature and instead did it this way:

#if ANY(TAZPro,TAZProXT,Workhorse)
#define X_LEVEL_SEQUENCE
#endif
#if defined (X_LEVEL_SEQUENCE)
#define LEVELING_COMMANDS “G28 Z\nM18 Z\nG4 P300\nG28 Z” //Homing to the top, disabling the Z motors for 300ms and then rehoming Z
#else
#define LEVELING_COMMANDS “G28 \nG34 \nG28”
#endif

Try a G34 and see if it works, otherwise, type the commands:

G28 Z
M18 Z
G4 P300
G28 Z

I have my own custom Drunken Octopus firmware and a BL Touch and in configuration_adh.h I use this:

/**

  • Mechanical Gantry Calibration
  • Modern replacement for the Průša TMC_Z_CALIBRATION.
  • Adds capability to work with any adjustable current drivers.
  • Implemented as G34 because M915 is deprecated.
  • @section calibrate
    */
    #define MECHANICAL_GANTRY_CALIBRATION
    #if ENABLED(MECHANICAL_GANTRY_CALIBRATION)
    #define GANTRY_CALIBRATION_CURRENT 340 // Default calibration current in ma
    #define GANTRY_CALIBRATION_EXTRA_HEIGHT 2 // Extra distance in mm past Z_###_POS to move
    #define GANTRY_CALIBRATION_FEEDRATE 100 // Feedrate for correction move
    //#define GANTRY_CALIBRATION_TO_MIN // Enable to calibrate Z in the MIN direction

//#define GANTRY_CALIBRATION_SAFE_POSITION XY_CENTER // Safe position for nozzle
//#define GANTRY_CALIBRATION_XY_PARK_FEEDRATE 3000 // XY Park Feedrate - MMM
//#define GANTRY_CALIBRATION_COMMANDS_PRE “”
#define GANTRY_CALIBRATION_COMMANDS_POST “G28” // G28 highly recommended to ensure an accurate position
#endif

This requires you set Z_MAX_POS to a very specific value based on how far the distance is between the probe and the top of the gantry since homing is now happening at the bottom instead of the top. So you will have to edit the firmware a few times to get G34 to work right. And pro tip, it really doesn’t work that well. I plan to set up independent z axes eventually by using the E1 stepper driver.

Thanks you!
I need to recompile the firmware tomorrow anyway so I’ll try that first.

G29 is the command to auto level, both for washer touching and also for BL touch.

Thanks, but I’m actually inquiring about the leveling of the X gantry. The Workhorse used to belts instead of lead screws for Z travel. They are more apt to become out of square and need to be
“re-zeroed” more often.