Toolboard fan oddity with M106 S0?



  • I just changed over to a duet 3 and a toolboard and rrf3.2. All firmwares are up to date.

    OK what I have is a part fan on Toolboard out1 and the hot end fan on Toolboard out2.

    Config settings (toolboard is address 20)

    ; Configuration file for _RRF3_
    ; search _RRF3_PIN_ for all gcodes that require pin names
    ; ToolBoard 1 address: 20
    
    ; Communication and general
    M111 S0                             	  ; Debug off
    M550 P"RailCore"			              ; Machine name and Netbios name (can be anything you like)
    ;M551 Pmyrap                        	  ; Machine password (used for FTP)
    ;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xEE 	  ; MAC Address
    
    ;*** Wifi Networking
    M552 S1					                  ; Enable WiFi
    M555 P2                           	      ; Set output to look like Marlin
    M575 P1 B115200 S1			              ; Comms parameters for PanelDue connected to Duet 3 io0.in
    
    G21                                       ; Work in millimetres
    G90                                       ; Send absolute coordinates...
    M83                                 	  ; ...but relative extruder moves
    
    ; Axis and motor configuration
    M669 K1					                  ; _RRF3_ change M667 to M669 ; set CoreXY mode
    
    M584 X0.2 Y0.0 Z0.5:0.3:0.4 E20.0         ; _RRF3_PIN_ Map Z to drivers 4, 5, 6
    M569 P0.2 S1                              ; _RRF3_PIN_ Drive 0 goes forwards    X stepper (Rear)
    M569 P0.0 S0                              ; _RRF3_PIN_ Drive 1 goes backwards	Y Stepper (Front)
    M569 P20.0 S0                             ; _RRF3_PIN_ Drive 3 goes forwards	Extruder 
    M569 P0.5 S0	  			              ; _RRF3_PIN_ Drive 5 goes backwards	Front Left Z
    M569 P0.3 S0  	  		                  ; _RRF3_PIN_ Drive 6 goes backwards	Rear Left Z
    M569 P0.4 S0				              ; _RRF3_PIN_ Drive 7 goes backwards	Right Z
    
    ;Leadscrew locations
    M671 X-18:-18:331 Y-2.4:250:125 S7.5      ; Hemera Front left, Rear Left, Right S7.5 is max correction - measure your offsets, to the bolt for the yoke of each 
    
    ;Axis and motor configuration
    M350 X16 Y16 Z16 E16 I1 		          ; Set 16x microstepping for axes & extruder, with interpolation.
    M574 X1 S1 P"io1.in"			          ; _RRF3_PIN_ set X endstop to xstop port active high
    M574 Y1 S1 P"20.io2.in"			          ; _RRF3_PIN_ set Y endstop to ystop port active high
    M906 X1400 Y1400 Z1000 E1000 I60 	      ; Motor currents (mA) - WARNING: Conservative - May trigger stallguard (and prematurely during homing) if sensorless.
    M201 X3000 Y3000 Z100 E1500               ; Accelerations (mm/s^2)
    M203 X24000 Y24000 Z900 E3600             ; Maximum speeds (mm/min)
    M566 X1000 Y1000 Z100 E1500               ; Maximum jerk speeds mm/minute
    M92 X200 Y200 Z1600 E409 		          ; Steps/mm for X.Y
    M208 X285 Y285 Z300                       ; (S0 default)set axis maxima and high homing switch positions (adjust to suit your machine)
    M208 X0 Y0 Z-0.5 S1                       ; (S1)set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)
    
    ; Thermistors
    M308 S0 P"temp0" Y"thermistor" A"Bed" T100000 B3950 R4700 H0 L0 		;_RRF3_PIN_ Bed thermistor, connected to bedtemp on Duet3
    M308 S1 P"20.temp0" Y"thermistor" A"Tool0" T100000 B4725 R4700 C7.06e-8 H0 L0	;_RRF3_PIN_ toolboard e3d
    M308 S7 P"spi.cs0" Y"rtd-max31865" A"Chamber"   ; _RRF3_PIN_ create sensor number 7 as a PT100 sensor in the first position on the Duet 2 daughter board connector
    M308 S8 P"20.temp1" Y"thermistor" A"Tool_area" T100000 B3950 R4700 H0 L0 	;_RRF3_PIN_ toolboard e3d
    
    ;heaters
    M950 H0 C"out0" T0			              ; _RRF3_PIN_ define Bed heater is on bedheat
    M950 H1 C"20.out0" T1			          ; _RRF3_PIN_ define Hotend heater is on ToolBoard out0
    M950 H7 C"out9" T7		                  ; _RRF3_PIN_ define Chamber heater is on inverted Duet3 pin 24v
    
    M307 H0 A406.6 C942.7 D9.9 S1.00 V24.1 B0 ; Bed Heaters PID results
    M140 H0					                  ; map heated bed to heater 0
    M143 H0 S120 
    M307 H1 A516.1 C228.9 D4.6 S1.00 V24.1 B0 ; Heater 1 model PID results - This is for the Hemera
    M570 H1 S360			                  ; Hot end may be a little slow to heat up so allow it 180 seconds
    M143 S285
    
    ; chamber heater 7 
    M307 H7 A39.4 C738.8 D0.8 S1.00 V24.1 B1  ; heater 7 from PID tune and set Bang-Bang with B1
    M141 H7                                   ; heater 7 is the chamber heater
    M143 H7 S60 
    M570 H7 T45				                  ; set Heater 7 (chamber) to allow a 45C change in temp over set temp - to remove errors
    
    ; Fans
    M950 F0 C"20.out1"			              ; _RRF3_PIN_ define fan0 - Part Fan 12v
    M950 F1 C"20.out2"			              ; _RRF3_PIN_ define fan1 - Head Fan 12v
    M950 F2 C"out4"				              ; _RRF3_PIN_ define fan2 - Lower Lighting 24v
    M950 F7 C"out8"			                  ; _RRF3_PIN_ define fan7 - Top Lighting 24v
    M950 F8 C"out5"			                  ; _RRF3_PIN_ define fan8 - Exhaust Fan 24v
    M950 F9 C"out7"			                  ; _RRF3_PIN_ define fan9 - Extruder Light 24v
    
    M106 P0 S0 H-1 C"Part Fan" 		          ; disable thermostatic mode for fan 0 - part cooler - turn off part fan
    M106 P1 S1.0 T60:190 C"Tool Fan"          ; turn on P1 Hot End to start since I'm using it for Hot End - safety
    M106 P2 H-1 S1 C"Int Light"               ; turn on lower interior lighting and disable thermostatic mode
    M106 P8 H7 T45 S0 C"Exhaust Fan"          ; turn on exhaust fan thermostatic mode on at 45C for top temperature regulation
    M106 P7 H-1 S1 C"Hood Light"              ; turn on top interior lighting and disable thermostatic mode
    M106 P9 H-1 S1 C"Part Light"              ; turn on top interior lighting and disable thermostatic mode
    
    
    ; Tool definitions
    M563 P0 S"Hemera Tool" D0 H1 F1           ; Define tool 0 - uses extruder 0, heater 1, fan 1 for tool cooling
    G10 P0 S0 R0                              ; Set tool 0 operating and standby temperatures
    
    ;BLTouch - comment out the following 3 lines if using a IR Probe
    M558 P9 C"^20.^io0.in" H5 R1 F200 T6000 A5 S0.02  ; _RRF3_PIN_ BLTouch connected to Z probe IN pin on toolboard
    M950 S0 C"20.io0.out"			          ; _RRF3_PIN_ Define BLTouch Servo (S0) on toolboard pwm1
    G31 X-33 Y0 Z3.95 P25                     ; Left Side BLTouch Add offsets appropriately - do a paper test, and put the probed value in the Z value here
    ;G31 X-33 Y0 Z2.78 P25                     ; Left Side BLTouch Add offsets appropriately - do a paper test, and put the probed value in the Z value here
    ;G31 X44 Y-39 Z0 P25                      ; Only use during Z configuration
    
    ;filament sensor
    M591 D0 P3 C"20.io1.in" S1 R30:180 E3.0 A0 L24.72   ; _RRF3_PIN_ SETUP FILAMENT OUT SENSOR S0 disable S1 enable A0 (default) = only check extruder motion of printing moves 
    
    M208 S1 Z-0.2			                  ; set minimum Z
    ;M208 S1 Z-5			                  ; set minimum Z - only use during Z configuration
    
    T0				                          ; select first hot end
    ;M501                                     ; load config-override
    
    

    When I start up the hot end fan is on but I started noticing that when I started a print it would turn off. Not good! So I started looking at possible reasons but I couldn't see anything in my startup script or the slicer that should cause the fan 0 to turn off. So then I looked at the actual gcode and found that the slicer was throwing in an M106 S0, well that shouldn't cause an issue since the default fan for the M106 gcode is '0' according to the documentation and that is the part fan.

    Pnnn Fan number (optional, defaults to 0). (In RRF_3 relates to the fan number created by M950, NOT the fan pin number on the board)

    but then I started sending my own gcodes and for whatever reason sending M106 S0 does turn off fan 1, not fan 0. Sending M106 P0 S0 does turn the part fan (P0) off and M106 P1 S0 turns the extruder fan (P1) off.So is there a documentation error, something stupid I am doing in config.g or what that is causing M106 S0 to turn off the wrong fan?



  • Can you post your entire config as there are some other sections that are also relevant.



  • can you run M92 P"config.g" and post the output



  • He means M98 P"config.g"


  • administrators

    You may need to add a G4 S1 near the start of config.g because the tool board can take longer to start up than the main board. The G4 command should be earlier than any commands that refer to any device on the tool board, such as your M950 and M106 commands, also earlier than the M584 command.



  • @jay_s_uk I modified the code in the original post to include all of the config.g

    I am in the middle of a print and will try the others after that completes. Thanks



  • @warpster said in Toolboard fan oddity with M106 S0?:

    M563 P0 S"Hemera Tool" D0 H1 F1

    you're defining the wrong fan against you tool.
    It should be F0.
    You shouldn't be associating thermostatically controlled fans with a tool



  • @jay_s_uk Thank you! I don't know how I missed that. I don't even know when that got added, anyway that is it. I haven't finished my print but I will post back after confirming.

    That took care of it, thanks again


Log in to reply