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

    Help with delta bed calibration macro

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    2
    153
    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.
    • blt3dpundefined
      blt3dp
      last edited by

      Hi, I have this macro that I usually run right after powering on my delta to calibrate. Usually this is run from the machine being off. But the other day, I needed to run it while the bed was at a temperature above my macro and my macro had to wait until the bed cooled. I was wondering if someone might take a look and suggest what to change so it will:

      Check to see if the current bed temp (either active or standby) is equal to or greater than 60C, and if so, continue on with the rest. But if it's below 60, to put it in standby temp and set it to 60 and wait

      I'd also like to do something similar with the hotend. But I'd like it not to continue if the hotend is above 130C

      Any help would be appreciated.

      Here's the macro

      G28		; home all towers
      G1 X0 Y0 Z5 F1800		; center nozle and move to 5mm above print bed
      M140 P0 R60 S0		; set bed standby temp to 60C
      M144 P0 S0		; set bed to standby
      M116		; wait for bed to reach temperature
      M568 P0 R130 S0 A1		; set hotend to standby and temp to 130C
      M116		; wait to reach temperatures
      G30		; probe for Z0
      G32		; autocalibrate
      

      My 3D Printing YouTube Channel
      Better Living Through 3D Printing

      Follow me on Instagram and Twitter
      Instagram
      Twitter

      1 Reply Last reply Reply Quote 0
      • achrnundefined
        achrn
        last edited by

        Assuming the bed heater is heater zero, If you change the M116 line to be:

        if heat.heaters[0].current < 60
            M116
        

        it will only do the M116 if the current temperature is less than 60.

        Note that the M116 needs to be indented by some spaces (I use four), and the next line must not be indented - RRF uses indents to delimit loops, conditional blocks etc.

        I'd actually be inclined to make it

        if heat.heaters[0].current < heat.heaters[0].standby
            M116
        

        then it will do the M116 if the current temperature is less than whatever the heater is set to (as standby), so if you change the '60' value in future it will not need changing in multiple places in the file.

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