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

    Binding 3 output to 1 control

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    4
    9
    313
    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.
    • Fred-Yundefined
      Fred-Y
      last edited by

      I have a 3D printer with a Duet 2 + Duex5 and 3 Berd Air pumps connected on duex.e2heat, duex.e3heat and duex.e4heat that I would like to control them together instead of independently - Basically, I want to bind these 3 fans to 1 "control".

      Below is my current config:

      ; Fans
      M950 F0 C"duex.e2heat" Q500
      M106 P0 S0 H-1                          
      M950 F2 C"duex.e3heat" Q500
      M106 P2 S0 H-1                          
      M950 F3 C"duex.e4heat" Q500
      M106 P3 S0 H-1                          
      

      I searched in the documentation but I have not found clue how to do it - I have also tried a few things but it did not work.

      Right now, I'm using a small script in daemon.g to set fan 2 and fan 3 at the same speed as fan 0

      m106 P2 S{fans[0].actualValue}
      m106 P3 S{fans[0].actualValue}
      

      It's working but there is some latency and that's not great for fast printing.

      I hope there is a better way to do it - thanks 🙂

      engikeneerundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD
        last edited by OwenD

        One method would be to do some post processing and replace all the M106 commands with say M106.1
        Then create an M106.1 macro in your /sys directory and put in it.

        M106 P0 S{param.S}
        M106 P2 S{param.S}
        M106 P3 S{param.S}  
        

        This would not adjust them all when you adjusted one in DWC though

        Fred-Yundefined 1 Reply Last reply Reply Quote 1
        • engikeneerundefined
          engikeneer @Fred-Y
          last edited by

          @Fred-Y just create a single fan with all three pins

          M950 F0 C"duex.e2heat+duex.e3heat+duex.e4heat" Q500
          

          E3D TC with D3Mini and Toolboards.
          Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
          i3 clone with a bunch of mods

          Fred-Yundefined droftartsundefined 2 Replies Last reply Reply Quote 0
          • Fred-Yundefined
            Fred-Y @engikeneer
            last edited by

            @engikeneer I tried your suggestion but it did not work.

            M950 F0 C"duex.e2heat+duex.e3heat+duex.e4heat" Q500
            M106 P0 S0 H-1  
            

            I had e3heat turned on when booting and only e2heat was controlled.

            droftartsundefined 1 Reply Last reply Reply Quote 0
            • Fred-Yundefined
              Fred-Y @OwenD
              last edited by

              @OwenD Thanks for your response.

              I just did it and it worked perfectly, I would have preferred avoid adding a post processing in the slicer but that not a big deal.

              I remember reading about creating gcode command but never used it, it's a great, simple and clean way to make custom commands / actions.

              1 Reply Last reply Reply Quote 0
              • Fred-Yundefined Fred-Y has marked this topic as solved
              • droftartsundefined
                droftarts administrators @engikeneer
                last edited by

                @engikeneer said in Binding 3 output to 1 control:

                just create a single fan with all three pins

                In M950, outputs defined as fans can only have two pins, and the second is the tachometer. See https://docs.duet3d.com/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-or-gpioservo-pin

                When using M950 to create a fan, the port name string may be either a single port, or two ports separated by the '+' sign. The second port is used to read the fan tacho.

                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

                1 Reply Last reply Reply Quote 1
                • droftartsundefined
                  droftarts administrators @Fred-Y
                  last edited by

                  @Fred-Y you can bind more than one fan to a tool. Then all fans will be controlled by M106 commands. Use M563 https://docs.duet3d.com/User_manual/Reference/Gcodes#m563-define-or-remove-a-tool

                  M563 P1 D0 H1 F0:2:3 ; create a tool using extruder drive 0, heater 1, and fan 0 mapped to fans 0, 2 and 3
                  

                  Fans will still be independently controllable.

                  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

                  Fred-Yundefined 1 Reply Last reply Reply Quote 1
                  • droftartsundefined
                    droftarts administrators
                    last edited by

                    I've added a short section on the end of the fans page covering use of multiple part cooling fans. https://docs.duet3d.com/en/User_manual/Connecting_hardware/Fans_connecting#allocating-fans-to-tools

                    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

                    1 Reply Last reply Reply Quote 1
                    • Fred-Yundefined
                      Fred-Y @droftarts
                      last edited by

                      @droftarts Thank Ian!
                      It works perfectly 🙂

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