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

    Order of instruction

    Scheduled Pinned Locked Moved
    My Duet controlled machine
    4
    9
    316
    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.
    • Jean-Baptisteundefined
      Jean-Baptiste
      last edited by

      Hello every one
      I'm having an issue with my machine
      I'm writing my GCode as POC and I was wondering if the order of instruction is important on Duet.
      To be clear is

      G19 G2 F3183 X144.716 Y188.322 Z10.202 I0.394 J-0.919 K0.000

      the same as

      G2 G19 F3183 X144.716 Y188.322 Z10.202 I0.394 J-0.919 K0.000

      I'm having some trouble with my printing and was wondering if it was possible that this was the origin of the issue

      thanks a lot

      droftartsundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @Jean-Baptiste
        last edited by

        @Jean-Baptiste The first one should be correct, as it is two separate commands, G19 then G2.

        The second one is unlikely to work, and either you'll get a message about G2 missing parameters before the G19 is called, and then the rest of the line is ignored, or the G19 will be ignored as G isn't a valid parameter for G2. It doesn't really conform to the example given in the NIST Gcode standard, which RRF tries to adhere to: https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374 page 24.

        In CNC mode, if a line of GCode does not begin with G or M (after skipping N and the line number, if present) but the previous command was G0, G1, G2 or G3, then the line is taken to be another G0, G1, G2 or G3 command. However, because you have a G19, I don't think the values will be related to the G2 command.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        Jean-Baptisteundefined 1 Reply Last reply Reply Quote 0
        • Jean-Baptisteundefined
          Jean-Baptiste @droftarts
          last edited by

          @droftarts Thanks for your confirmation on my issue...

          I have discretization of every G1 movement at a moment long before any G2/G3 movement.

          G1 Xxxx Yyyyy

          This line does first the movement in X direction then in Y direction instead of doing it in the same time and I have no clue on why it does that

          Any idea?

          droftartsundefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @Jean-Baptiste
            last edited by

            @Jean-Baptiste What version of RRF are you using? Are you using CNC mode? Is it sent as one line? If there's a line break between the Xxxx and Yyyy, you could be running into the feature that I highlighted in the last paragraph of my last post.

            Ian

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            Jean-Baptisteundefined 1 Reply Last reply Reply Quote 0
            • Jean-Baptisteundefined
              Jean-Baptiste @droftarts
              last edited by

              @droftarts For the Duet, I've got this:

              RepRapFirmware for Duet 3 MB6HC version 3.5.0-rc.3 (2024-01-24 17:58:49) running on Duet 3 MB6HC v1.02 or later (SBC mode)

              I'm not using CNC mode (I think, I'm not the one configuring it and we do 3D printers)
              I send it as a single line, as it should be if we want a straight movement, isn't it?

              T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators @Jean-Baptiste
                last edited by

                @Jean-Baptiste said in Order of instruction:

                I send it as a single line, as it should be if we want a straight movement, isn't it?

                yes it should be executed as a single movement. what kinematics do you have configured in config.g?

                www.duet3d.com

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @Jean-Baptiste
                  last edited by dc42

                  @Jean-Baptiste yes the order matters. Each G or M or T command in the line of GCode introduces a new command as far as RRF is concerned, and these commands are executed in order. So in the first of your examples RRF executes this:

                  G19
                  G2 F3183 X144.716 Y188.322 Z10.202 I0.394 J-0.919 K0.000

                  In the second it is executes this:

                  G2
                  G19

                  The other parameters in the second line will be ignored because the G19 command doesn't take any parameters.

                  Within each command, the order of the parameters doesn't matter.

                  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
                  • T3P3Tonyundefined
                    T3P3Tony administrators @Jean-Baptiste
                    last edited by

                    @Jean-Baptiste said in Order of instruction:

                    @droftarts Thanks for your confirmation on my issue...

                    I have discretization of every G1 movement at a moment long before any G2/G3 movement.

                    G1 Xxxx Yyyyy

                    This line does first the movement in X direction then in Y direction instead of doing it in the same time and I have no clue on why it does that

                    Any idea?

                    My reply that the command should be executed in one move was in reference to this comment.

                    www.duet3d.com

                    1 Reply Last reply Reply Quote 0
                    • Jean-Baptisteundefined
                      Jean-Baptiste
                      last edited by

                      Turns out my colleague made another post on the forum, I'll leave them handle this issue.
                      It seems to be linked with circular interpolation on a beta version, I don't have more intel on it.

                      Thanks for your help

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