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

    Can I use G32 to call bed.g and run G29 in it?

    Scheduled Pinned Locked Moved
    General Discussion
    2
    2
    205
    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.
    • printerguy3dundefined
      printerguy3d
      last edited by

      I am struggling to try and combine some commands.

      Can I use G32 to call bed.g and inside my bed.g file call G29 to get the bed mesh?
      Is this creating a recursive loop and kicking it out?

      Here is the start of my sequence.

      G90
      M83
      M106 S0
      ; reset filament monitor
      M42 P63 S0
      G4 P100
      G4 P50
      M42 P63 S1
      ;
      M104 S0 ;cancel S3D set temp
      G21 ; set units to mm
      G90 ; use absolute coordinates
      T0 ; select tool 0
      G92 E0.0 ; reset e count
      M220 S100 ; reset speed multiplier
      M140 S45 ; set bed temp and do not wait
      G32 ; probe bed
      M190 S45 ; set bed temperature and wait
      M109 S230 ; set print head temperature and wait
      ; === pause for heating ===

      But it seems that when G32 runs, nothing happens.
      Here is the bed.g file called by G32

      M83 ; set extruder to relative mode
      G29 S2 ; clear any existing height map
      M557 X7:353 Y11:354 P2:2 ; Define G29 grid. Done here so we don't have to modify config.g

      ; heat and home
      M104 S260 ; set head temperature and do not wait
      G28 ; home all axes
      G28 Z ; home Z again in case it was bottomed out
      M109 S260 ; set head temperature and wait

      ; Probe sequence
      G29 ; probe bed

      G1 X1 Y1 Z10 F4000 ; move to home position

      Is there a better way to do this?

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @printerguy3d
        last edited by

        @printerguy3d G32 basically just calls bed.g. G29 is a pretty normal part of bed.g, so no problem there; you just wouldn't put G32 in bed.g.

        The sequence in your code is:

        • Your gcode sets the bed temperature, then does not wait to call bed.g
        • bed.g sets the hot end temperature, then homes without waiting
        • It then sets the hot end temperature and waits to get to temperature
        • Then probes the bed to create and save the bed mesh, returns to start gcode
        • Sets hot end and bed temps, waits to get to them

        So you're probing while the hot end and bed are still warming up. Unless your bed is changing all the time, and needs calibrating between every print, it's better to just load a saved bed mesh heightmap. I do it by having a bed.g macro that:

        • heats the bed to the operating temperature
        • homes the axes (I have X0 Y0 in the middle of my bed)
        • probe the bed with G29, saving the results

        Then each time you print, home and probe the bed once at the centre to set the Z height, and load the bed mesh. Generate a new bed mesh with G32 if you notice it needs it.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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