Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Streamlining lines of code...

    Tuning and tweaking
    3
    5
    83
    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.
    • Nightowl
      Nightowl last edited by

      I'm not in the habit of trimming code just for the sake of it, but I don't see the point of having lines of code where they're not necessary. So with that in mind, could these lines:

      G1 H1 Y787 F1800 ; move quickly to Y axis endstop and stop there (first pass)
      G1 H2 Y-3 F6000 ; go back a few mm
      G1 H1 Y793 F360 ; move slowly to Y axis endstop once more (second pass)

      ...be replaced with something like this:

      G1 H1 Y780 F1800 Y7 F360 ; move quickly then slow down to the Y axis endstop and stop there
      G1 H2 Y-3 F6000 ; go back a few mm

      I'm not sure it would work, or even if it's worth doing, but I'm curious.

      Thanks

      Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
      I'm still on my learning curve, so take everything I say with caution!

      RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

        @nightowl999 that won't work, but you could use this:

        G1 H1 Y787 F1800 G1 H2 Y-3 F6000 G1 H1 Y793 F360 ; home Y

        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

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

          @dc42 OK. Yep, it's probably more logical (and therefore easier) to do it as separate lines - and much easier to fault check too!

          Thank you 👍

          Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
          I'm still on my learning curve, so take everything I say with caution!

          RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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

            @nightowl999 If you want to simplify it even more, then consider that the second Y move is unlikely to attain the feedrate of 6000 mm/sec over a distance of only 3mm unless you have extremely high acceleration. So you could drop the F6000 which will keep the feedrate of 1800 from the previous move. Also, after the first H1 pass, the axis will be flagged as homed so you could drop to the H2. The second move would then be simply G1 Y-3

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

            Nightowl 1 Reply Last reply Reply Quote 1
            • Nightowl
              Nightowl @deckingman last edited by

              Cool, @deckingman, thank you. The 6000 was legacy from the RRF config tool, so I'm not even sure why it's there.

              I'm on a steep learning curve, for sure 😨

              Few things are more dangerous than taking the advice of someone who thinks he knows what he's doing.
              I'm still on my learning curve, so take everything I say with caution!

              RatRig 1075, Duet3 MB6HC, Sorotec SFM 1000 PV-ER milling motor, Hobbyist

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