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

    Clarification re: stop.g please...

    Scheduled Pinned Locked Moved Solved
    CNC
    3
    11
    409
    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.
    • jay_s_ukundefined
      jay_s_uk @Nightowl
      last edited by

      @Nightowl M0 also calls stop.g
      I believe in 3.5 its going to be ran automatically rather than requiring to be called.
      If those coordinates are actual rather than workplace, put G53 in front, e.g. G53 G1 X10 Y10 and the actual coordinates will be used rather than the workplace.

      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

      Nightowlundefined 1 Reply Last reply Reply Quote 0
      • Nightowlundefined
        Nightowl @jay_s_uk
        last edited by

        @jay_s_uk

        The last few lines of the generated .gcode file are these:

        G2X229.500Y0.000I0.000J-1.000
        G0Z2.000
        M5
        G0Z5.000
        G0X0.000Y0.000
        

        Am I correct in thinking these are set by the post processor? If so, then I'll need to change the pp to reflect those settings above, or just replace those lines with M0 and use the stop.g code to move the spindle to the safe place.

        @jay_s_uk said in Clarification re: stop.g please...:

        If those coordinates are actual rather than workplace, put G53 in front,

        Oh, really? And I thought I was beginning to understand these things! So, using G53 to move the spindle to the save coordinates won't affect the work zero, so if I run the same job it won't start at some other random spot, but exactly where it started the last time?

        I just want to be sure.. šŸ¤• 😊

        Thanks

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

          @Nightowl yes, those last few lines look like they've been added by the post processer.

          And yes, G53 doesn't affect the workplace coordinates and only applies to that line it's on. So each line would need G53. Useful for when you have different workplace offsets for each job.

          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

          Nightowlundefined 1 Reply Last reply Reply Quote 1
          • Nightowlundefined
            Nightowl @jay_s_uk
            last edited by Nightowl

            Thank you, @jay_s_uk , and just to be a PITA, which would be the best option...

            a) Amend the PP to:

            M5
            G53 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400	; move the Z axis to a safe height		
            G53 X273.5 Y560	F2400							; move XY to a safe place
            

            ...or...
            b) Amend the PP to:

            M5
            M98 P"stop.g"
            

            ...or...
            c) Amend the PP to:

            1| M5
            2| M0
            

            ... with options b) and c) requiring the stop.g file to be like this:

            ; stop.g
            M5
            G53 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400	; move the Z axis to a safe height		
            G53 X273.5 Y560	F2400							; move XY to a safe place
            

            ...or doesn't it really matter?

            (I'm not exactly sure where the Z height line came from, but I think DC42 commented on it before. I'll need to check...)

            Thanks

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

              @Nightowl I would say that it would be C but without M5, so purely M0.

              The z line looks like it will probably always move to max-5.
              But anyway, that all looks good

              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

              Nightowlundefined 1 Reply Last reply Reply Quote 1
              • Nightowlundefined
                Nightowl @jay_s_uk
                last edited by Nightowl

                @jay_s_uk

                Hmm, I must have missed something...

                The last few lines of the gcode file look like this (where are the line numbers?):

                ...
                G1X69.400Y15.600
                G1X69.597Y15.747
                G1X69.828Y15.831
                G0Z8.000
                M0
                

                ...and this is the code in the stop.g file (there are line numbers here, though!):

                ; stop.g
                M5
                G53 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400	; move the Z axis to a safe height		
                G53 X273.5 Y560	F2400							; move XY to a safe place
                

                ...but, when I run the short test file, the spindle appears to move up, but not to the XY coordinates set in line 4.

                EDIT: Actually, this was a dry run, so the spindle was off. I'll check if the M5 command works in the next couple of days).

                dc42undefined 1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @Nightowl
                  last edited by

                  @Nightowl the G53 command by itself doesn't cause motion, it just affects how coordinates in the rest of the line are interpreted. So you need to use G53 G1 Z...

                  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

                  Nightowlundefined 1 Reply Last reply Reply Quote 0
                  • Nightowlundefined
                    Nightowl @dc42
                    last edited by

                    Thank you, @dc42 . It had to be something straightforward šŸ‘

                    And thank you for being here on Christmas Eve!

                    Nightowlundefined 1 Reply Last reply Reply Quote 0
                    • Nightowlundefined
                      Nightowl @Nightowl
                      last edited by Nightowl

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • Nightowlundefined
                        Nightowl
                        last edited by

                        Never mind, I’m sorted āœ…

                        1 Reply Last reply Reply Quote 0
                        • T3P3Tonyundefined T3P3Tony marked this topic as a question
                        • T3P3Tonyundefined T3P3Tony has marked this topic as solved
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA