Solved Binding 3 output to 1 control
-
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
-
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-Y just create a single fan with all three pins
M950 F0 C"duex.e2heat+duex.e3heat+duex.e4heat" Q500
-
@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.
-
@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.
-
-
@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
-
@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
-
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
-
@droftarts Thank Ian!
It works perfectly