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

    Implementing macros in gcode

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    211
    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.
    • sinned6915undefined
      sinned6915
      last edited by

      I print with PLA and PC+. I use a hotend mounted piezo for a Z probe.

      My print start up routine is to preheat the bed and nozzle, the nozzle a point where any residual plastic softened for cleaning but no ooze.

      Thing is I need to have a different temp for PC+ than for PLA.

      Since I am also using a PanelDue now, I'd like to be able to call up the macro to preheat and level too.

      Can this macro be called up via the gcode? I know that I can have filament specific gcode in the slicer, and that is an option, but I am thinking that the best way for me is the macro.

      I tried searching for this but getting too many results that dont apply.

      Any suggestions?

      tia

      sinneD

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @sinned6915
        last edited by

        @sinned6915 Yes - look at M98 https://duet3d.dozuki.com/Wiki/Gcode#Section_M98_Call_Macro_Subprogram

        You can use M98 pretty much anywhere, including the slicer start gcode or in the slicer filaments section if it has one.

        So for example in my start gcode I might have
        M98 P"0:/macros/PrePostPrintMacros/PrePrint3CBed50"
        M98 P"0:/macros/SetToolTemps/4Tool195"

        The first "preprint" macro heats the bed and carries out homing. The homing file itself calls a macro to wipe the nozzle before homing Z so macros can be nested in that way.
        The second macro above sets the tool temperature for 4 tools to 195deg C but I have other macros for other tool/temperature combinations.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 1
        • sinned6915undefined
          sinned6915
          last edited by

          thank you! i think this will work!

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