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

    Synchronizing different motors for simultaneous activity

    Scheduled Pinned Locked Moved
    MultiAxis Printing
    2
    3
    187
    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.
    • Selmanundefined
      Selman
      last edited by

      Dear all,
      I need help in the following matter. I have a self-made 3D printer consisting of a moving bed (X, Y and Z motors), and instead of an ordinary printing nozzle, I have 3 syringe pumps (U,V, and W motors) -printing biological scaffolds-. I would like to: continuously extrude from the syringe pumps using ordinary command for U,V, and W (G1 U10 V10 F10; which is already optimally working), while the X,Y, and Z motors are moving to shape the scaffold. In summary, the union of ((U,V, and W)) is working perfectly. The union of ((X,Y, and Z)) is working perfectly. I just want that both unions work simultaneous way. (The use of G1 X Y Z U V W, all motors in the same command is avoidable); I was trying to use M596, but was not working as shown below -corrections to the code are most welcome-:

      ;Process1
      M596 P1;
      G91;
      G1 U2 V2 F0.792;

      ;Process0
      M596 P0;
      G4 P100000;
      G90;
      G1 X100 Y100 Z0;
      G91;
      G1 X-60 Y0 Z0;
      G3 X0 Y-10 Z0 I0 J-5;
      G1 X50 Y0 Z0;
      G2 X0 Y-10 Z0 I0 J-5;
      G1 X-50 Y0 Z0;
      ...

      Thanks in advance.
      Best,

      T3P3Tonyundefined Selmanundefined 2 Replies Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators @Selman
        last edited by T3P3Tony

        @Selman

        So to confirm you want to vary the amount that each syringe pump (U, V, W) contribute to the extrusion for each move? If that's the case then I would not use multiple motion systems. Instead I would set each of the syringes up as a separate drive on the same tool, and then either send an array of amounts per move or use the mixing ratio to vary how much each syringe contributes per move.

        This will mean you no longer send a G1 U V W command for the syringes instead you would send a G1 E command and treat them like extruders.

        Depending on what you are using to generate the gcode this could be:

        G1 Xxx Yxx Zzz Eaa:bb:cc

        or
        M567 P0 Ea.aa:b.bb:c.cc
        G1 Xxx Yxx Zzz Eee

        Either way you start by setting up a tool to use the drives you currently have allocated to U, V and W.

        So your M584 command becomes something like this, depending on what drives are used for what:
        M584 X0 Y1 Z2 E3:4:5

        the tool definition command:
        M563 P0 D0:1:2

        More details from our documentation here:
        https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m563-define-or-remove-a-tool

        D The 'D' field specifies the drive(s) used by the tool - in the first example drives 0, 2 and 3. The 'D' field number corresponds to the 'E' parameter defined in the M584 command. '0' means first 'E' driver in M584 and so on. Drive 0 is the first drive in the machine after the movement drives (usually X, Y and Z). If there is no 'D' field the tool has no drives. Tools are driven using multiple values in the 'E' field of G1 commands, each controlling the corresponding drive in the 'D' field above, as follows:

        G1 X90.6 Y13.8 E2.24:2.24:15.89
        G1 X70.6 E0:0:42.4
        

        The first line moves straight to the point (90.6, 13.8) extruding a total of 2.24mm of filament from both drives 0 and 2 and 15.98mm of filament from drive 3. The second line moves back 20mm in X extruding 42.4mm of filament from drive 3.
        Alternatively, if the slicer does not support generating G1 commands with multiple values for the extrusion amount, the M567 command can be used to define a tool mix ratio.

        www.duet3d.com

        1 Reply Last reply Reply Quote 1
        • Selmanundefined
          Selman @Selman
          last edited by

          @T3P3Tony, thanks a lot for your response.
          Seems like an interesting solution to try.
          Will surely put it to the test.
          Best,
          Jad

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