Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Help with start G-code for bed leveling.

    Scheduled Pinned Locked Moved
    General Discussion
    2
    4
    576
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • westechundefined
      westech
      last edited by

      Newbee at this. I have had a BLTouch on my Ender 3 for awhile. Haven't really used it. I still have the Z endstop switch I'm using for homing. I guess I need to remove that?

      I use Cura. But I think this is the same for any "start G code."

      Someone was helping me on Discord about, manually executing a bed level mesh. Then storing that. Then only have the start g code retrieve the mesh. I do not want my G code to do a bed level at the start of each print.

      My goal was to be able to swap out my Mirror, for a textured flex plate. Do a manual bed level to compensate for the new bed height, and just print.

      So, I've read the info on G29 and M420.

      But I'd like to put that in practice if anyone could share their start G-code, as I mentioned that would just load the stored mesh.

      Let me se if I understand.

      I'd switch to say the flex bed. Run a bed level command. save that.

      Then in my Start G-code, I would Home X&Y, then use the BLTouch to home the Z, Then it would load the mesh data, then move on to printing?

      Thanks, just a little confused.

      Max

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @westech
        last edited by

        @westech

        In your mesh.g file, which is used to create the height map, you should have at least:

        ; *** THIS CODE ASSSUMES THE PRINTER IS ALREADY HOMED ***
        
        G29 S2                      ; cancel mesh bed compensation
        M290 R0 S0                  ; cancel baby stepping
        
        M557 Xaaa:bbb Yccc:ddd P20  ; define 400 point mesh (aaa, bbb, ccc, ddd need to be set suitable for your printer)
        
        G1 Xeee Yfff                ; move to center of bed (eee, fff  need to be set suitable for your printer)
        G30                         ; set Z=0 Datum
        
        G29 S0                      ; do probing and create heightmap.csv
        

        To load the height map you just need

        ; *** THIS CODE ASSSUMES THE PRINTER IS ALREADY HOMED ***
        
        G1 Xeee Yfff                ; move to center of bed (eee, fff need to be set suitable for your printer)
        G30                         ; set Z=0 Datum
        
        G29 S1                      ; load heightmap.csv created with mesh.g
        

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        westechundefined 1 Reply Last reply Reply Quote 0
        • westechundefined
          westech @fcwilt
          last edited by

          Thank you for the information. I'm trying to implement it.

          CURRENT MY START G-CODE:

          ; Ender 3 Custom Start G-code

          G92 E0 ; Reset Extruder
          G28 ; Home all axes
          G1 Z2.0 F3000 ; Move Z Axis up little
          G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
          G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
          G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
          G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
          G92 E0 ; Reset Extruder
          G1 Z2.0 F3000 ; Move Z Axis up little
          G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

          Does Mesh.g go in Sys or Marcos?

          Added the New Load Mesh to Start G code. (does this look correct?)

          ; Ender 3 Custom Start G-code

          G92 E0 ; Reset Extruder
          G28 ; Home all axes

          G1 X110 Y110                ; move to center of bed
          G30                         ; set Z=0 Datum
          G29 S1                      ; load heightmap.csv created with mesh.g

          G1 Z2.0 F3000 ; Move Z Axis up little
          G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
          G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
          G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
          G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
          G92 E0 ; Reset Extruder
          G1 Z2.0 F3000 ; Move Z Axis up little
          G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

          Also, I have one other issue I'm not sure about. For this to work, I need to remove my Z endstop switch?

          Thanks

          Max

          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @westech
            last edited by

            @westech

            mesh.g goes into the SYS folder.

            All of my printers have a Z endstop sensor and a Z probe.

            I use the endstop sensor for homing and the probe for set the Z=0 Datum, bed leveling and mesh creation.

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA