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

    Requests for help: Gcode cam follower/ tangential knife control.

    Scheduled Pinned Locked Moved
    General Discussion
    12
    62
    10.2k
    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.
    • Russ Griesundefined
      Russ Gries
      last edited by

      For those interested, here is what our current script spits out.

      This is just a simple circle.

      G1 Z0
      G1 X12.5629 Y-0.5687 U-92.8147 ( Delta = 42.1853 Val = 267.185 )
      G1 X12.3774 Y-1.8196 U-98.4351 ( Delta = -5.62044 Val = 261.565 )
      G1 X12.0701 Y-3.0462 U-104.065 ( Delta = -5.62971 Val = 255.935 )
      G1 X11.6441 Y-4.2369 U-109.686 ( Delta = -5.62101 Val = 250.314 )
      G1 X11.1034 Y-5.38 U-115.315 ( Delta = -5.62889 Val = 244.685 )
      G1 X10.4533 Y-6.4647 U-120.936 ( Delta = -5.62107 Val = 239.064 )
      G1 X9.7 Y-7.4804 U-126.563 ( Delta = -5.62692 Val = 233.437 )
      G1 X8.8508 Y-8.4174 U-132.186 ( Delta = -5.62321 Val = 227.814 )
      G1 X7.9138 Y-9.2666 U-137.814 ( Delta = -5.62818 Val = 222.186 )
      G1 X6.8981 Y-10.0199 U-143.437 ( Delta = -5.62321 Val = 216.563 )
      G1 X5.8134 Y-10.67 U-149.064 ( Delta = -5.62692 Val = 210.936 )
      G1 X4.6703 Y-11.2107 U-154.685 ( Delta = -5.62107 Val = 205.315 )
      G1 X3.4796 Y-11.6367 U-160.314 ( Delta = -5.62889 Val = 199.686 )
      G1 X2.2529 Y-11.944 U-165.936 ( Delta = -5.62211 Val = 194.064 )
      G1 X1.0021 Y-12.1295 U-171.564 ( Delta = -5.62795 Val = 188.436 )
      G1 X-0.261 Y-12.1916 U-177.185 ( Delta = -5.6211 Val = 182.815 )
      G1 X-1.524 Y-12.1295 U-182.815 ( Delta = -5.62956 Val = 177.185 )
      G1 X-2.7749 Y-11.944 U-188.435 ( Delta = -5.62021 Val = 171.565 )
      G1 X-4.0016 Y-11.6367 U-194.064 ( Delta = -5.62861 Val = 165.936 )
      G1 X-5.1922 Y-11.2107 U-199.687 ( Delta = -5.62364 Val = 160.313 )
      G1 X-6.3354 Y-10.67 U-205.313 ( Delta = -5.62542 Val = 154.687 )
      G1 X-7.42 Y-10.0199 U-210.938 ( Delta = -5.62534 Val = 149.062 )
      G1 X-8.4357 Y-9.2666 U-216.563 ( Delta = -5.62459 Val = 143.437 )
      G1 X-9.3727 Y-8.4174 U-222.186 ( Delta = -5.62321 Val = 137.814 )
      G1 X-10.222 Y-7.4804 U-227.811 ( Delta = -5.62482 Val = 132.189 )
      G1 X-10.9753 Y-6.4647 U-233.437 ( Delta = -5.62657 Val = 126.563 )
      G1 X-11.6254 Y-5.38 U-239.064 ( Delta = -5.62692 Val = 120.936 )
      G1 X-12.166 Y-4.2369 U-244.689 ( Delta = -5.62517 Val = 115.311 )
      G1 X-12.5921 Y-3.0462 U-250.31 ( Delta = -5.62052 Val = 109.69 )
      G1 X-12.8993 Y-1.8196 U-255.94 ( Delta = -5.62967 Val = 104.06 )
      G1 X-13.0849 Y-0.5687 U-261.56 ( Delta = -5.62084 Val = 98.4396 )
      G1 X-13.1469 Y0.6944 U-267.19 ( Delta = -5.62944 Val = 92.8101 )
      G1 X-13.0849 Y1.9574 U-272.81 ( Delta = -5.6205 Val = 87.1896 )
      G1 X-12.8993 Y3.2083 U-278.44 ( Delta = -5.62922 Val = 81.5604 )
      G1 X-12.5921 Y4.435 U-284.059 ( Delta = -5.61974 Val = 75.9407 )
      G1 X-12.166 Y5.6256 U-289.692 ( Delta = -5.6323 Val = 70.3084 )
      G1 X-11.6254 Y6.7688 U-295.309 ( Delta = -5.61706 Val = 64.6913 )
      G1 X-10.9753 Y7.8534 U-300.938 ( Delta = -5.62944 Val = 59.0619 )
      G1 X-10.222 Y8.8691 U-306.563 ( Delta = -5.62459 Val = 53.4373 )
      G1 X-9.3727 Y9.8061 U-312.189 ( Delta = -5.62657 Val = 47.8107 )
      G1 X-8.4357 Y10.6553 U-317.814 ( Delta = -5.62482 Val = 42.1859 )
      G1 X-7.42 Y11.4086 U-323.437 ( Delta = -5.62321 Val = 36.5627 )
      G1 X-6.3354 Y12.0588 U-329.058 ( Delta = -5.6207 Val = 30.942 )
      G1 X-5.1922 Y12.5994 U-334.691 ( Delta = -5.63332 Val = 25.3087 )
      G1 X-4.0016 Y13.0254 U-340.313 ( Delta = -5.62133 Val = 19.6874 )
      G1 X-2.7749 Y13.3327 U-345.936 ( Delta = -5.62364 Val = 14.0637 )
      G1 X-1.524 Y13.5183 U-351.56 ( Delta = -5.62413 Val = 8.43958 )
      G1 X-0.261 Y13.5803 U-357.19 ( Delta = -5.62922 Val = 2.81036 )
      G1 X1.0021 Y13.5183 U-362.81 ( Delta = -5.6205 Val = 357.19 )
      G1 X2.2529 Y13.3327 U-368.44 ( Delta = -5.63011 Val = 351.56 )
      G1 X3.4796 Y13.0254 U-374.064 ( Delta = -5.62347 Val = 345.936 )
      G1 X4.6703 Y12.5994 U-379.686 ( Delta = -5.62211 Val = 340.314 )
      G1 X5.8134 Y12.0588 U-385.311 ( Delta = -5.62479 Val = 334.689 )
      G1 X6.8981 Y11.4086 U-390.94 ( Delta = -5.62906 Val = 329.06 )
      G1 X7.9138 Y10.6553 U-396.563 ( Delta = -5.62303 Val = 323.437 )
      G1 X8.8508 Y9.8061 U-402.186 ( Delta = -5.62321 Val = 317.814 )
      G1 X9.7 Y8.8691 U-407.814 ( Delta = -5.62818 Val = 312.186 )
      G1 X10.4533 Y7.8534 U-413.437 ( Delta = -5.62321 Val = 306.563 )
      G1 X11.1034 Y6.7688 U-419.062 ( Delta = -5.62459 Val = 300.938 )
      G1 X11.6441 Y5.6256 U-424.687 ( Delta = -5.62534 Val = 295.313 )
      G1 X12.0701 Y4.435 U-430.313 ( Delta = -5.62542 Val = 289.687 )
      G1 X12.3774 Y3.2083 U-435.936 ( Delta = -5.62364 Val = 284.064 )
      G1 X12.5629 Y1.9574 U-441.565 ( Delta = -5.62861 Val = 278.435 )
      G1 X12.625 Y0.6944 U-447.185 ( Delta = -5.62021 Val = 272.815 )

      On this one we keep the U on the same line, just for testing.

      Indeed if we wanted to do it correctly we would need to have the U on its own line, so its going the correct direction before the move. we have tested both. I just dont like waiting for every stop.

      Currently my U stepper has a gear down ratio of something like 1:100 . this makes it compact but it can not spin fast... I think if i had it moving faster it would look more smooth.

      Say is there something I can do with the Jerk settings or anywhere else to make the moves smother? Even tho there are stops at every point with U on its own line in the code?

      Thanks!

      ~Russ

      One Day At A Time…
      My Main Research Page:
      http://rwgresearch.com/open-projects/3d-printing-research/

      1 Reply Last reply Reply Quote 0
      • Kulitorumundefined
        Kulitorum
        last edited by

        @Kulitorum here.

        I tried to use G2 and G3 but they are not interpolated very nice in current firmware and pausing during a G2 or G3 messes up and the printhead moves in random directions. I talked to dc42 about this, but I guess the current use of G2 and G3 is too low for him to spend time with it.

        So I use very short lines of a max of 5 mm. With good jerk and acceleration parameters, that moves smoothly and allows me to pause a print at any time within 25mm, in regards to 4-5 commands being buffered in firmware.

        Your slicer should keep an eye on overflow (crossing 360 degrees) and if needed "rewind" the rotation back to 0 to untangle your wires.

        Now watching thread, if you need more help. Unfortunatly I can't share my code.

        Kulitorum

        Russ Griesundefined dc42undefined 2 Replies Last reply Reply Quote 1
        • Russ Griesundefined
          Russ Gries @Kulitorum
          last edited by Russ Gries

          @kulitorum

          Hello! Wonderful to see you here. And thanks for any help you can give.

          Can you post your jerk settings?

          So you are using G1 commands for everything?
          If so. Are you using U commands on a new line? Or are you just using them on the same line as the XY accordance? It seems that it depends on if its a cornner or not...

          Any thing i should look out for that you had trubble with would be greaty appreciated if you could note those here.

          I would like to run at higher speeds, so i may have more trouble than you have had getting things to run smoth.

          Again thanks for sharing what you can!

          ~Russ

          One Day At A Time…
          My Main Research Page:
          http://rwgresearch.com/open-projects/3d-printing-research/

          1 Reply Last reply Reply Quote 0
          • Kulitorumundefined
            Kulitorum
            last edited by

            Well, my machine is a lot larger then yours, so comparing acceleration and jerk settings don't really make much sense.

            Yes, I use G1 for everything, and have the U coordinate together with my XY coordinates. Ofcause my U coordinate is a tangent to a half vector between the line before and the line after the vertex, so you need to do some calculation there. You will need to have the coords XYU on the same line to get anything smooth. Increase your jerk until you start loosing steps, then increase your power on each motor until they reach 50-60c and lower the jerk until it don't fail no more.

            Hope this helps. If you need more help, setup remote control of your computer and a webcam, and I can control your computer and we can adjust it together over skype 🙂

            Kulitorum

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

              @kulitorum said in Requests for help: Gcode cam follower/ tangential knife control.:

              I tried to use G2 and G3 but they are not interpolated very nice in current firmware and pausing during a G2 or G3 messes up and the printhead moves in random directions. I talked to dc42 about this, but I guess the current use of G2 and G3 is too low for him to spend time with it.

              Have you tried using G2/G3 with recent firmware versions? If you still have problems with G2/G3 when using firmware 2.02RC2, please let me know what they are.

              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
              • dc42undefined
                dc42 administrators @Russ Gries
                last edited by

                @russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:

                Can you explain this rounding error.
                What is the maximum amount of numbers after the decimal place i can have for the axis?

                The calculations are done using 32-bit floating point values. See https://www.exploringbinary.com/decimal-precision-of-binary-floating-point-numbers/ for info about the precision.

                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
                • Danalundefined
                  Danal @Russ Gries
                  last edited by Danal

                  Quite a bit has been said since the original question... still, if it helps:

                  @russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:

                  @danal said in Requests for help: Gcode cam follower/ tangential knife control.:

                  Russ,

                  Given David's answer that RepRap does not distinguish axis, and given that G-Code (and RepRap) ensure that all axis in a given single move reach their individual endpoints in sync, this all adds up to doing EXACTLY what you want for a coil winder.

                  That is, if the current XYZ position of the "control point" is somwhere around a coil, ready to make the next coil, and the U axis is "pointed aft" to correctly lay the wire, then a G2 arc move that specifies a next XY 1/4 of the way around the coil, and a U that specifies 90 degrees from where U starts (in the correct positive or negative direction)... that move will smoothly rotate U as XY accelerate, move, deccelerate.

                  Personally, I'd do 1/4 arcs while debugging so that you can "see" what is happening better.... but once you've confirmed how this all should work, and "good" g-code, then G2 moves that do full circles, one entire coil per G2 line, should be easy.

                  This is all very hard to put into words... does it make sense?

                  p.s. I'd still recommend you define your rotational axis as A (not U). This is a widespread standard for extra axis in CNC. It also MIGHT make the Web interface display it better.

                  Hi Danal,

                  Thanks for all your feed back,

                  what your saying makes sense. but let me get something correct.

                  If i send "G2 X90.6 Y13.8 I5 J10 U45"

                  David is saying that as the arc move is happening, The U will slowly move around the arc. and the motion will be fluid on the U along the direction of the arc?

                  Yes, that is the correct fundamental idea.

                  however, doing it point to point i will need to add the U on the line before the move so i know its going in the right direction. correct?

                  I would phrase it more as "U is needed on every line". Same idea.

                  Delta / Kossel printer fanatic

                  1 Reply Last reply Reply Quote 0
                  • Danalundefined
                    Danal
                    last edited by Danal

                    @russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:

                    Also, are you able to make a simple script program that has an in interface for such a G code generator?

                    Probably. Let me "check assumptions" on my end. Inputs to such a generator for "cylindrical" coil wraps would need to be:

                    • Core diameter (what the wire would be wrapped around, even if removed post wrapping).
                    • Core "length" or "height". In other words, first wrap at z=0 and last wrap at Z=this parameter.
                    • Wire diameter
                    • Number of layers
                    • Packing - even or offset (see below)
                    • Fudge factor for packing density. Could be called "tightness".

                    What else?

                    Even Packing:

                    OOO   OOO
                    OOO   OOO
                    OOO   OOO
                    OOO   OOO
                    OOO   OOO
                    OOO   OOO
                    

                    Offset Packing(would really be half spaced, characters will not show that properly)

                    OOO    OOO
                     OOO  OOO
                    OOO    OOO
                     OOO  OOO
                    OOO    OOO
                     OOO  OOO
                    OOO    OOO
                     OOO  OOO
                    

                    And, is there a need for "non cylindrical" winds? Donut/Torus or similar? Those are probably beyond a simple script. Examples:

                         OO    OO
                        OOO    OOO
                      OOOOO    OOOOO
                     OOOOOO    OOOOOO
                      OOOOO    OOOOO
                       OOOO    OOOO
                         OO    OO
                       
                    
                         OO    OO
                       OOO      OOO
                     OOOO        OOOO
                    OOO            OOO
                     OOOO        OOOO
                       OOO      OOO
                         OO    OO
                       
                    

                    Delta / Kossel printer fanatic

                    Russ Griesundefined 1 Reply Last reply Reply Quote 1
                    • Russ Griesundefined
                      Russ Gries
                      last edited by

                      Thanks for the feedback everyone. I will reply to comments sooner than later I hope.

                      In the meantime I decided to use a stepper motor directly as my tool end. This mainly to reduce any backlash and confusion between how many steps per revolution Ect. Right now I'm using an unknown stepper motor with a very large gear reduction which I cannot tune correctly. (I also re built it for bipolar). It also has a tremendous amount of backlash in the gears and renders it almost useless for this application. It's also not fast enough so I decided to dig through my Box of steppers and I found these really nice point 9゚ steppers. I ended up drilling a hole down the center and I'm going to attach my tool end directly on the shaft. This is a nema 17 which is quite large and heavy, but this is to prove the concept it will work, and because it was free in my bin of parts. 😉

                      Yeah that hole sucked to drill... but i got it!!

                      Here's a few photos
                      I'll post more later
                      Thanks
                      ~Russ

                      0_1539062048035_20181008_220825.jpg 0_1539062052439_20181008_220837.jpg 0_1539062056515_20181008_212958.jpg 0_1539062066110_20181008_220823.jpg

                      One Day At A Time…
                      My Main Research Page:
                      http://rwgresearch.com/open-projects/3d-printing-research/

                      1 Reply Last reply Reply Quote 0
                      • Russ Griesundefined
                        Russ Gries
                        last edited by

                        Ok, still haven't had time to sit down and respond to posts... will do shortly.

                        However i have managed to get this done.

                        https://youtu.be/lqoa55_MOiY

                        A proper video will be posted on my main YT when its time...

                        ~Russ

                        One Day At A Time…
                        My Main Research Page:
                        http://rwgresearch.com/open-projects/3d-printing-research/

                        1 Reply Last reply Reply Quote 0
                        • Russ Griesundefined
                          Russ Gries
                          last edited by

                          One step closer...

                          https://youtu.be/2Jksxj-7JEM

                          https://youtu.be/5zuiqzTgi_U

                          But still alot to do.

                          0_1539566126740_20181014_172301.jpg
                          0_1539566166646_20181014_172303.jpg
                          0_1539566181253_20181014_172310.jpg
                          0_1539566271766_20181014_173539.jpg

                          ~Russ

                          One Day At A Time…
                          My Main Research Page:
                          http://rwgresearch.com/open-projects/3d-printing-research/

                          1 Reply Last reply Reply Quote 0
                          • Russ Griesundefined
                            Russ Gries @Danal
                            last edited by

                            @danal said in Requests for help: Gcode cam follower/ tangential knife control.:

                            @russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:

                            Also, are you able to make a simple script program that has an in interface for such a G code generator?

                            Probably. Let me "check assumptions" on my end. Inputs to such a generator for "cylindrical" coil wraps would need to be:

                            • Core diameter (what the wire would be wrapped around, even if removed post wrapping).
                            • Core "length" or "height". In other words, first wrap at z=0 and last wrap at Z=this parameter.
                            • Wire diameter
                            • Number of layers
                            • Packing - even or offset (see below)
                            • Fudge factor for packing density. Could be called "tightness".

                            What else?

                            Even Packing:

                            OOO   OOO
                            OOO   OOO
                            OOO   OOO
                            OOO   OOO
                            OOO   OOO
                            OOO   OOO
                            

                            Offset Packing(would really be half spaced, characters will not show that properly)

                            OOO    OOO
                             OOO  OOO
                            OOO    OOO
                             OOO  OOO
                            OOO    OOO
                             OOO  OOO
                            OOO    OOO
                             OOO  OOO
                            

                            And, is there a need for "non cylindrical" winds? Donut/Torus or similar? Those are probably beyond a simple script. Examples:

                                 OO    OO
                                OOO    OOO
                              OOOOO    OOOOO
                             OOOOOO    OOOOOO
                              OOOOO    OOOOO
                               OOOO    OOOO
                                 OO    OO
                               
                            
                                 OO    OO
                               OOO      OOO
                             OOOO        OOOO
                            OOO            OOO
                             OOOO        OOOO
                               OOO      OOO
                                 OO    OO
                               
                            

                            I will sendyou a PM and descuss this further!!

                            Thanks
                            ~Russ

                            One Day At A Time…
                            My Main Research Page:
                            http://rwgresearch.com/open-projects/3d-printing-research/

                            1 Reply Last reply Reply Quote 0
                            • Russ Griesundefined
                              Russ Gries
                              last edited by

                              wow, that's all i have to say...

                              https://www.youtube.com/watch?v=yPXUmXTCtok
                              https://www.youtube.com/watch?v=aq7Zv-7jEf8

                              0_1539582515130_20181014_205603.jpg
                              0_1539582522746_20181014_210920.jpg
                              0_1539582672419_20181014_212657.jpg
                              0_1539582530121_20181014_212704.jpg
                              0_1539582543153_20181014_214201.jpg
                              0_1539582554671_20181014_214204.jpg
                              0_1539582564808_20181014_214141.jpg
                              0_1539582571172_20181014_214131.jpg

                              ~Russ

                              One Day At A Time…
                              My Main Research Page:
                              http://rwgresearch.com/open-projects/3d-printing-research/

                              1 Reply Last reply Reply Quote 3
                              • Russ Griesundefined
                                Russ Gries
                                last edited by

                                https://www.youtube.com/watch?v=QfoMRPy4bJk

                                still a lot more to do... but its looking good.

                                ~Russ

                                One Day At A Time…
                                My Main Research Page:
                                http://rwgresearch.com/open-projects/3d-printing-research/

                                1 Reply Last reply Reply Quote 0
                                • Russ Griesundefined
                                  Russ Gries
                                  last edited by Russ Gries

                                  47.5 AWG wire. about 1000 turns, 4.186 Kohms. That's a lot of resistance!

                                  Its funny you cant even see the wire going in to the tool...

                                  not to bad. got a bit of a slip there in the center.... more to tune still. also the roller play's a roll. Get it... ha,
                                  on i'm slap happy...

                                  0_1540575694883_20181026_082736.jpg 0_1540575699249_20181026_082745.jpg 0_1540575702929_20181026_093638.jpg 0_1540575707010_20181026_092932.jpg 0_1540575711000_20181026_093427.jpg

                                  God Bless,
                                  ~Russ

                                  One Day At A Time…
                                  My Main Research Page:
                                  http://rwgresearch.com/open-projects/3d-printing-research/

                                  1 Reply Last reply Reply Quote 1
                                  • Russ Griesundefined
                                    Russ Gries
                                    last edited by

                                    https://www.youtube.com/watch?v=jmNTSxDMqxM

                                    One Day At A Time…
                                    My Main Research Page:
                                    http://rwgresearch.com/open-projects/3d-printing-research/

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

                                      Nice! Anyone have any ideas of applications for flat coils? Wireless charging perhaps?

                                      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

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

                                        ...yes, wireless charging coils. See https://uk.farnell.com/w/c/passive-components/inductors/charging-coils/prl/results?st=wireless+charging+coils.

                                        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
                                        • Alexander Mundyundefined
                                          Alexander Mundy
                                          last edited by Alexander Mundy

                                          Off the top of my head, besides wireless charging: VLF radio. Magnetic radio for underground (cave, tunnel, etc) to surface communication. With larger gauge and some spacing, bed heat for a delta or polar, or induction heating. Metal detector coil.

                                          1 Reply Last reply Reply Quote 0
                                          • jot4pundefined
                                            jot4p
                                            last edited by jot4p

                                            Hi @Russ-Gries ,

                                            Fantastic topic.

                                            So, you use Duet3d wifi with RepRapFirmware correct ?

                                            What is your gcode generator /slicer ?

                                            You create a script to run your gcode and change the values ? Do you have more information about your post processor ?

                                            Thanks

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