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

Nesting commands in Macros

Scheduled Pinned Locked Moved
Tuning and tweaking
2
3
620
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.
  • undefined
    i3dp
    last edited by 26 Mar 2018, 17:49

    Hello everyone,

    I'm trying to set up a semi-automatic probe offset Macro for my self built CoreXY printer.

    Essentially, the process is to home, send a G30 command to probe the bed. After that I zero the height with G92 Z0 and send M208 S1 Z-100 so I can use the jog controls to go below 0.

    I then use a piece of paper to find the correct nozzle height and then I put that Z height (changing its sign from - to +) in the G31 command in the config.

    However, I do not know how I can automate this.

    1st Macro will look like this:

    "
    G28 X
    G28 Y
    G1 X110 Y110 F6000
    G30
    G92 Z0
    M208 S1 Z-100
    "
    I would then to the paper thing and I want another Macro to read the Z height value and save it in the config. Is there any way I can do this?

    Macro 2:
    "
    G31 Z"M114 Z"
    M500
    "

    Regards,
    Adrian

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 26 Mar 2018, 19:36

      I think this may work:

      • position the nozzle a few mm above the bed,
      • send M558 P0 to select manual probing mode
      • send G30
      • raise the nozzle a few mm
      • use M558 to select the Z probe
      • send G31 S-2
      • send M500 P31 to write config-override.g including the G31 parameters

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      1 Reply Last reply Reply Quote 0
      • undefined
        i3dp
        last edited by 27 Mar 2018, 13:33

        Thanks for the reply!

        I don't quite understand what G31 S-2 does. Looking at the wiki the S parameter is for temperature calibration?

        I'm going to try it out anyway and see the results.

        Regards,
        Adrian

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