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

    macros in Simplify3d

    Scheduled Pinned Locked Moved
    General Discussion
    4
    13
    1.1k
    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.
    • r123undefined
      r123 @r123
      last edited by

      Hmm, I think the commas are benign. They might be carriage returns or something.

      So why isn't the Macro running on the Duet when the Gcode comes through?

      NexxCatundefined 1 Reply Last reply Reply Quote 0
      • NexxCatundefined
        NexxCat @r123
        last edited by

        @r123 Simplify3D uses commas as a newline character when storing the profile and in the gcode header. Those should be fine.

        I'm running a macro in my S3D start gcode using the following syntax:

        M98 P"0:/macros/prime_nozzle.g"		; Run nozzle prime macro
        

        Perhaps try removing the spaces from the macro file name?

        r123undefined 1 Reply Last reply Reply Quote 0
        • r123undefined
          r123 @NexxCat
          last edited by

          @nexxcat and you have added a ".g" to the filename. When I tried that in DWC it didn't accept it? So is the syntax different when sending from the slicer?

          NexxCatundefined 1 Reply Last reply Reply Quote 0
          • NexxCatundefined
            NexxCat @r123
            last edited by

            @r123 said in macros in Simplify3d:

            @nexxcat and you have added a ".g" to the filename. When I tried that in DWC it didn't accept it? So is the syntax different when sending from the slicer?

            Not sure why DWC wouldn't accept that. All my macros have a .g extension.

            Here is my full start gcode from S3D, if that helps 🙂

            G28					; Home all
            M190 R[bed0_temperature] 		; Heat the bed to temperature
            G4 S60					; Sleep for 60s to allow heat soak
            M290 R0 S0				; Reset baby-stepping to 0
            G32					; Level the bed
            G28 Z					; Re-home Z
            G29 S0					; Probe the bed
            G1 X-100 Y-100				; Move XY back to home
            G10 P0 S[extruder0_temperature] R160	; Heat nozzle to print temperature
            M116					; Wait until temperatures are reached
            M98 P"0:/macros/prime_nozzle.g"		; Run nozzle prime macro
            
            r123undefined 1 Reply Last reply Reply Quote 0
            • r123undefined
              r123 @NexxCat
              last edited by

              @nexxcat ah, then I should be giving my macros a ".g" extension in the name which also appears in DWC?

              so call mine "Dock_Wipe.g" in DWC?

              NexxCatundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
              • NexxCatundefined
                NexxCat @r123
                last edited by

                @r123 said in macros in Simplify3d:

                @nexxcat ah, then I should be giving my macros a ".g" extension in the name which also appears in DWC?

                so call mine "Dock_Wipe.g" in DWC?

                It's worth a try 🙂

                1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @r123
                  last edited by

                  @r123 when creating a macro its not explicitly given a file extension.
                  So if you called it prime_nozzle (and thats what its shown as in DWC), thats a different file to prime_nozzle.g

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  r123undefined 1 Reply Last reply Reply Quote 0
                  • r123undefined
                    r123 @jay_s_uk
                    last edited by

                    @jay_s_uk it works without the extension in DWC. But does it work without the extension when called from a gcode file. For me it didn't. Planning to try on next print renaming to .g and calling with .g . Unless hear otherwise!

                    r123undefined 1 Reply Last reply Reply Quote 0
                    • r123undefined
                      r123 @r123
                      last edited by

                      Yay, that's it. The ".g" suffix is obligatory on the filename if you want to call it from a G-code file. However it's not if you want to just call the macro from DWC shortcut list, or if you want to call it from DWC's "send command window" using a M98 command etc.. Which is somewhat confusing to beginners.

                      Additionally, spaces and capitals are OK (human friendly);

                      [And, in case anyone's reading, I noticed that in the guide the M117 command does not require "" around the message it sends. However in most recent versions of firmware/DWC it does!]

                      r123undefined dc42undefined 2 Replies Last reply Reply Quote 0
                      • r123undefined
                        r123 @r123
                        last edited by

                        THanks @NexxCat @jay_s_uk 😉

                        1 Reply Last reply Reply Quote 2
                        • dc42undefined
                          dc42 administrators @r123
                          last edited by

                          @r123 said in macros in Simplify3d:

                          Yay, that's it. The ".g" suffix is obligatory on the filename if you want to call it from a G-code file.

                          Normal practice is not to use a '.g' suffix on user macros, because the full filename of the macro (including any extension) less any leading digits followed by underscore is what should be displayed in the list of macros in DWC and on PanelDue.

                          When calling a user macro form M98 you will need to use the exact file name, including any leading digits and underscore.

                          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

                          r123undefined 1 Reply Last reply Reply Quote 0
                          • r123undefined
                            r123 @dc42
                            last edited by r123

                            @dc42 it seems that DWC parses out any ".g" suffix on the filename for display purposes in the Dashboard (though not the macro file list).

                            As above, I found that if called a macro "my macro" it would not call from a gcode file produced by s3d start script.

                            (with M98 P"path/my macro" )

                            But if I called it "my macro.g" then it would call from the gcode file

                            (with M98 P"path/my macro.g")

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