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

    Runing 2 Z axis and 2 spindle independent in the same time

    Scheduled Pinned Locked Moved
    CNC
    6
    22
    663
    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.
    • martin7404undefined
      martin7404
      last edited by martin7404

      Hi all I built a specialized machine for drilling long 6m Alu extrusions.
      The part is 90 deg angle profile and It has 300mm pattern on both walls.
      I managed to drill it and move the profile fully automated, but for the other wall pattern, I have to run the profile a second time.
      I am using duet wifi with breakout board and external 3 Nm closed loop steppers
      alt text
      I have in hand a drill press head with quil and motor. I will mount this on table so I can drill on the 90 deg wall
      I want to do both drilling operations in the same time.
      This means multi chanel CNC. So I will have to use the separate controller to run the spindle and second Z-axis.
      I am thinking duet3 mini with 1 XD or HCL boards .

      SO THE qestion is this going to work
      Main controler duet wifi and second mini with external board
      Main proggram moves the part, then sends output high to mini3 and starts drilling, when finished sets the output to low and wait for mini to give trigger that is finished, in the same time mini gets trigger and starts drilling when finished checks that wifi is finished and sends output high to wifi.
      How do you think is this going to work?
      Any advice how to implement this.
      In theory, it should work.
      Side bonus I will be able to play with HCL board and Nema 23 closed-loop stepper

      Muldex IDEX Duet2+Duex5
      Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
      Sapphire Pro with Duet2, with closed-loop motors
      custom high temp E3D tool changer with Duet2+Duex

      o_lampeundefined JoergS5undefined 2 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @martin7404
        last edited by

        @martin7404
        I guess you can simply add another external driver to the breakout board and use drive mapping to make both spindles do the same.

        M584 X... Y... Z{*Z1driver*}:{*Z2driver*}
        
        martin7404undefined 1 Reply Last reply Reply Quote 1
        • martin7404undefined
          martin7404 @o_lampe
          last edited by

          @o_lampe Unfortunately it is not possible.
          The hole on the shorter side is combo tool drill with a countersink for M6.
          And the hole on the longer side is M6 thread.
          I am using combo tools that is why I put VFD on the spindle drive in order to switch spindle RPM with M code.
          So I really need 2 channel control

          Muldex IDEX Duet2+Duex5
          Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
          Sapphire Pro with Duet2, with closed-loop motors
          custom high temp E3D tool changer with Duet2+Duex

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

            @martin7404 we're looking at supporting dual independent Z in RRF 3.5 on at least the Duet 3 6HC and 6XD. We may support it on Duet 3 Mini too. It won't be available on Duet 2 because of memory limitations.

            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

            martin7404undefined 1 Reply Last reply Reply Quote 1
            • martin7404undefined
              martin7404 @dc42
              last edited by martin7404

              @dc42 That is great news, but I will need to make different Z moves and spindle revs in the same time. So I really will need 2 controllers with trigers. So-called multi-channel CNC 🙂 Like the multispindle/multi axis CNC lathes are working

              Muldex IDEX Duet2+Duex5
              Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
              Sapphire Pro with Duet2, with closed-loop motors
              custom high temp E3D tool changer with Duet2+Duex

              1 Reply Last reply Reply Quote 0
              • martin7404undefined
                martin7404
                last edited by

                I still did not get feedback Is it possible to use 2 separate Duet controllers working together as an example duet wifi with duet3 mini

                Muldex IDEX Duet2+Duex5
                Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                Sapphire Pro with Duet2, with closed-loop motors
                custom high temp E3D tool changer with Duet2+Duex

                o_lampeundefined 1 Reply Last reply Reply Quote 0
                • o_lampeundefined
                  o_lampe @martin7404
                  last edited by o_lampe

                  @martin7404
                  They can talk through external triggers managed by gcode. but there is always a small delay between setting a trigger output and the other controller reading it. Although in your case you can reduce it a lot, since the second controller doesn't have much to do. So using a very short while-loop in daemon.g would read the trigger input faster than the default 10sec.

                  The meaning of the triggers (one input and one output on each controller) are:
                  Trigger 1 tells controller 2, that it can start drilling. (position is reached, clamps are tight a.s.o)
                  Trigger 2 is set from controller 2 and tells, it is ready with it's job. So Controller 1 knows, it can move to the next position.

                  But I still think, you should stick with Duet 2 using external drivers:
                  Wouldn't it be possible to use a different axis name (eg. U, V or W) for the second spindle?
                  I'm sure in a macro you can :
                  switch between spindle definitions
                  change spindle setting (speed, direction)
                  switch back to other spindle

                  martin7404undefined 2 Replies Last reply Reply Quote 1
                  • martin7404undefined
                    martin7404 @o_lampe
                    last edited by

                    @o_lampe I see
                    But the problem is I want both spindles to work in the same time, and they have different drilling/taping cycle etc

                    Muldex IDEX Duet2+Duex5
                    Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                    Sapphire Pro with Duet2, with closed-loop motors
                    custom high temp E3D tool changer with Duet2+Duex

                    jay_s_ukundefined o_lampeundefined 2 Replies Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @martin7404
                      last edited by

                      @martin7404 you'll need to wait for RRF 3.5 and the separate gcode streams that are planned

                      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

                      martin7404undefined 1 Reply Last reply Reply Quote 0
                      • martin7404undefined
                        martin7404 @jay_s_uk
                        last edited by martin7404

                        @jay_s_uk Yes great ,but the question if it is possible to make it now with 2 separate duets and if yes how

                        Muldex IDEX Duet2+Duex5
                        Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                        Sapphire Pro with Duet2, with closed-loop motors
                        custom high temp E3D tool changer with Duet2+Duex

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

                          @martin7404 no, it's not possible

                          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

                          martin7404undefined 1 Reply Last reply Reply Quote 0
                          • martin7404undefined
                            martin7404 @jay_s_uk
                            last edited by

                            @jay_s_uk Thank you

                            Muldex IDEX Duet2+Duex5
                            Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                            Sapphire Pro with Duet2, with closed-loop motors
                            custom high temp E3D tool changer with Duet2+Duex

                            1 Reply Last reply Reply Quote 0
                            • martin7404undefined
                              martin7404 @o_lampe
                              last edited by

                              @o_lampe Can you give example for this while loop
                              This is what I do not get
                              Otherwise, I would have to do it with some wait time with G4

                              Muldex IDEX Duet2+Duex5
                              Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                              Sapphire Pro with Duet2, with closed-loop motors
                              custom high temp E3D tool changer with Duet2+Duex

                              1 Reply Last reply Reply Quote 0
                              • o_lampeundefined
                                o_lampe @martin7404
                                last edited by

                                @martin7404 said in Runing 2 Z axis and 2 spindle independent in the same time:

                                @o_lampe I see
                                But the problem is I want both spindles to work in the same time, and they have different drilling/taping cycle etc

                                They will continue to work. In the end you only set their control inputs to a certain PWM or logic level. You only need a short moment of their attention to change the settings. Then you can switch over to addres the other spindle.

                                I was also looking for a good example, how to setup a while loop in daemon.g. I must admit, I only echoed what others have posted here, but never used it. Maybe @owenD can chime in here?

                                martin7404undefined OwenDundefined 2 Replies Last reply Reply Quote 0
                                • martin7404undefined
                                  martin7404 @o_lampe
                                  last edited by

                                  @o_lampe But
                                  IF I have 2 independent Z axis Z and W
                                  I need let us say
                                  Both spindles on with diferent speeds
                                  Z axis to Z1 F6000, then to Z -5 F200 , Then switch speed of this spindle to 100 RPM, then Z -12 F99 , Spindle reverse rotation Z 1 F101 , Z 10 F6000 , spindle stop
                                  Other is
                                  W axis to W 1 F6000, then W -6 F120, Then W -13 F6000, switch spindle speed to 300 RPM, W - 18 F100 , W 10 F6000 , spindle stop

                                  Muldex IDEX Duet2+Duex5
                                  Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                                  Sapphire Pro with Duet2, with closed-loop motors
                                  custom high temp E3D tool changer with Duet2+Duex

                                  1 Reply Last reply Reply Quote 0
                                  • JoergS5undefined
                                    JoergS5 @martin7404
                                    last edited by JoergS5

                                    This post is deleted!
                                    martin7404undefined 1 Reply Last reply Reply Quote 0
                                    • OwenDundefined
                                      OwenD @o_lampe
                                      last edited by

                                      @o_lampe @martin7404
                                      If you were to run two controllers I think the best way would be to set up triggers.
                                      So for example have a button which is connected to both boards in parallel and assigned to trigger one.
                                      Trigger one starts the drilling file in both boards.
                                      Each board would have to control other I/O's that would be set high/low when

                                      • the extrusion was in position
                                      • the drilling started
                                      • the drilling was complete
                                      • the extrusion was moving
                                      • the job was starting and complete

                                      You'd then just have to while loops that looked for the status of these I/O's and carry out each procedure at the correct sequence.

                                      We use a similar process when having two robots work synchronously.

                                      It's a bit more work than I have time for to provide working code.

                                      martin7404undefined 1 Reply Last reply Reply Quote 1
                                      • martin7404undefined
                                        martin7404 @JoergS5
                                        last edited by

                                        @joergs5 Thank you
                                        My explanation is not very clear.
                                        In your example the machine will drill the first set , then the next
                                        I want them to work simultaneously

                                        Muldex IDEX Duet2+Duex5
                                        Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                                        Sapphire Pro with Duet2, with closed-loop motors
                                        custom high temp E3D tool changer with Duet2+Duex

                                        1 Reply Last reply Reply Quote 0
                                        • martin7404undefined
                                          martin7404 @OwenD
                                          last edited by martin7404

                                          @owend Thank you
                                          That is exactly what I need.
                                          But I am not able to find an explanation how trigers work
                                          What I know
                                          You set it in the config and you write triger#.g macro for this input, that is clear.
                                          But how to set it in the part program to wait for this input?
                                          As an example, the second controller is running the secondary Z and spindle and is doing only drilling/tap operation
                                          The part program is running it has to wait for "GO - workholding clamps on" and when finished to activate output to tell the first controller it is ready and retracted from the part.
                                          The first controller after finishing it's drilling operation have to check for the confirmation of the second
                                          How do you program that ?
                                          I have experience with CNC lathe with double spindles with Siemens 840D, and there you write a separate program for each channel and you have special code to wait while the other chanel reaches line #

                                          Muldex IDEX Duet2+Duex5
                                          Custom CoreXY 600x400 Hemera , Duet3+Toolboard+1HCL closed loop
                                          Sapphire Pro with Duet2, with closed-loop motors
                                          custom high temp E3D tool changer with Duet2+Duex

                                          OwenDundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                          • OwenDundefined
                                            OwenD @martin7404
                                            last edited by OwenD

                                            @martin7404
                                            Essentially you would segment the program on each board.
                                            So when trigger1 runs it starts both files.
                                            Then you do something like
                                            Board 1 sets the "moving" I/O high and does the moves to move the extrusion to the first hole.
                                            In your code on board3 you would have something like

                                            while sensors.gpIn[6].value =1
                                              G4 P100
                                            

                                            Then it will do nothing till board 1 signals that the extrusion is in position
                                            When board one has the extrusion in position, both boards set their "drilling" I/O high
                                            At the end of drilling each would have to another while loop to ensure both were finished before repeating the process

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