Filament Sensor Error reported while not printing from SD
-
Hi all,
I have a filament sensor configured for my Prusa Bear MK3s (Duet 3 Mini 5+; RRF 3.4.0; DWC 3.4.0):
M591 D0 P2 C"io3.in" S1 ; configure filament sensor for extruder drive 0 on pin io3.in and turn it on
Here is my config.g:
;---------------------------------------------------------------------------------------------------------------------------------------------- ; config.g ; ; Duet 3 Mini 5+ ; RRF Version BUILD_VARIABLE_RRF_VERSION ; Bear Configuration BUILD_VARIABLE_BEAR_CONFIG_VERSION ; ; Description: ; - main configuration file ; - executed on start-up ;---------------------------------------------------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------------------------------------------------- ; General Preferences ;---------------------------------------------------------------------------------------------------------------------------------------------- G90 ; absolute positioning M83 ; extruder relative positioning M550 P"duet-bear" ; set printer name ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Network ;---------------------------------------------------------------------------------------------------------------------------------------------- if {network.interfaces[0].type = "ethernet"} ; network type = ethernet M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP else ; network type = wifi M552 S1 ; enable network ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Drives ;---------------------------------------------------------------------------------------------------------------------------------------------- M569 P0.0 D3 V10 S0 ; physical drive 0.0 goes backwards / Z-left / reduced V parameter to enable stealthChop M569 P0.1 D3 V10 S0 ; physical drive 0.1 goes backwards / Z-right / reduced V parameter to enable stealthChop M569 P0.2 D3 S1 ; physical drive 0.2 goes forwards / Y M569 P0.3 D3 S0 ; physical drive 0.3 goes backwards / X M569 P0.4 D3 S1 ; physical drive 0.4 goes forwards / E M584 X0.3 Y0.2 Z0.0:0.1 E0.4 ; set drive mapping M671 X-36.5:293.5 Y0:0 ; define lead screw positions M350 X32 Y32 Z32 E64 I1 ; configure microstepping with interpolation M92 X200.00 Y200.00 Z800.00 E1660.00 ; set steps per mm M566 X480.00 Y480.00 Z48.00 E300.00 ; set maximum instantaneous speed changes (mm/min) M203 X24000.00 Y24000.00 Z1200.00 E6000.00 ; set maximum speeds (mm/min) M201 X4000.00 Y4000.00 Z1000.00 E1500.00 ; set accelerations (mm/s^2) M906 X490 Y490 Z490 E400 I40 ; set motor currents (mA) and motor idle factor in per cent M84 S60 ; set idle timeout M564 H0 S1 ; allow unhomed movement and forbid axis movement outside defined limits ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Axis Limits ;---------------------------------------------------------------------------------------------------------------------------------------------- M208 X0 Y-4 Z0 S1 ; set axis minima M208 X250 Y212.5 Z210 S0 ; set axis maxima ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Endstops ;---------------------------------------------------------------------------------------------------------------------------------------------- M574 X1 S3 ; configure sensorless endstop for low end on X M574 Y1 S3 ; configure sensorless endstop for low end on Y M915 X S3 F0 H200 R0 ; set the X axis sensitivity M915 Y S3 F0 H200 R0 ; set the Y axis sensitivity M591 D0 P2 C"io3.in" S1 ; configure filament sensor for extruder drive 0 on pin io3.in and turn it on ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Z-Probe ;---------------------------------------------------------------------------------------------------------------------------------------------- M558 P5 C"^io2.in" H5 F500 T10000 A1 ; set Z probe type to switch on pin io2.in, dive height + speed, travel speeds and number of probes G31 P1000 X23 Y5 Z0 ; set Z probe trigger value, offset and trigger height M557 X24:228 Y6:208 P7:7 ; define mesh grid ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Heaters ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Bed Heater M308 S0 P"temp0" Y"thermistor" T100000 B4725 C7.06e-8 A"Bed" ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" Q50 T0 ; create bed heater output on out0 and map it to sensor 0, PWM frequency 50Hz M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S110 ; set temperature limit for heater 0 to 110°C ; Hotend Heater M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Nozzle" ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S300 ; set temperature limit for heater 1 to 300°C ; PID Parameters (replaced by parameters stored in config-override.g once auto-tuning has been completed) M307 H0 R0.272 C450.420:450.420 D11.34 S1.00 V24 B0 I0 ; default heater model parameters bed M307 H1 R4.253 C178.556:93.430 D2.87 S1.00 V24 B0 I0 ; default heater model parameters hotend ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Fans ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Part Cooling Fan M950 F0 C"out5" Q500 ; create fan 0 on pin out5 and set its frequency M106 P0 C"Part Cooling" S0 H-1 ; set fan 0 name and value. Thermostatic control is turned off ; Hotend Fan M950 F1 C"out3" Q500 ; create fan 1 on pin !out3 and set its frequency M106 P1 C"Hotend" S1 H1 T50 ; set fan 1 name and value, thermostatic control is turned on ; Case Fan M950 F2 C"out6" Q500 ; create fan 2 on pin out6 and set its frequency M106 P2 C"Case" S1 H1 T50 ; set fan 2 name and value, thermostatic control is turned on ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Tools ;---------------------------------------------------------------------------------------------------------------------------------------------- M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0°C M302 S180 R180 ; allow extrusion and retraction starting at 180°C ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Global Variables ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Filament Temperatures global abs_hotend_temp = 240 ; global ABS hotend temperature variable global abs_bed_temp = 110 ; global ABS bed temperature variable global greentecpro_hotend_temp = 230 ; global GreenTec Pro hotend temperature variable global greentecpro_bed_temp = 60 ; GreenTec Pro bed temperature global pc_hotend_temp = 270 ; global GreenTec Pro hotend temperature variable global pc_bed_temp = 110 ; global GreenTec Pro bed temperature variable global petg_hotend_temp = 235 ; global PETG hotend temperature variable global petg_bed_temp = 80 ; global PETG bed temperature variable global pla_hotend_temp = 210 ; global PLA hotend temperature variable global pla_bed_temp = 60 ; global PLA bed temperature variable global tpu_hotend_temp = 230 ; global TPU hotend temperature variable global tpu_bed_temp = 60 ; global TPU bed temperature variable ;---------------------------------------------------------------------------------------------------------------------------------------------- ; Miscellaneous ;---------------------------------------------------------------------------------------------------------------------------------------------- M575 P1 S1 B57600 ; enable support for PanelDue M501 ; load saved parameters from non-volatile memory T0 ; select tool 0
The problem I am facing right now is that I get a filament error reported even when I am not printing from SD card. So when I power up the printer and no filament is loaded, I get the following message:
Error: Filament error on extruder 0: noFilament
The message alone would not be a big problem (still feels misplaced though) but I have some macros where I am unloading filament first (like for PID tuning). Once I unloaded the filament, I get the above error and the macro is interrupted and won't continue without manually triggering it again.
Am I doing something wrong? My understanding is that the error should only be reported/or interrupt when the printer is actually printing from SD card.
-
Here is the PID tuning macro I am currently using for the nozzle as example:
;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ; PID Nozzle ; ; Description: ; - macro file ; - PID tuning routine for the nozzle ; - unloads filament before PID tuning ; - PID tuning will approx. take 5 minutes ; - do not leave printer unattended ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ; Preparation ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- M291 P"PID tuning the NOZZLE will take approx. 5 minutes!" S2 R"PID NOZZLE" ; requires user acknowledgement M291 P"Do NOT leave the printer unattended during the calibration procedure!" S2 R"PID NOZZLE" ; requires user acknowledgement M702 ; unloads currently assigned filament if heat.heaters[1].current > 50 ; if hotend temperature is > 50°C M568 S0 ; turn off hotend heater M140 S0 ; turn off bed heater M106 S1 ; turn on part cooling fan at 100% M291 P"Cooling HOTEND to below 50°C!" S1 T0 ; message to inform that hotend is cooling down while heat.heaters[1].current > 50 ; as long as hotend temperature is > 50°C G4 S3 ; wait 3 seconds, then read hotend temperature again, repeats until hotend temperature is =< 50°C M107 ; turn off part cooling fan ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ; PID Nozzle ;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ; Touning Routine M291 P"Do you want to start the PID tuning routine for the NOZZLE at 230°C?" S3 R"PID NOZZLE" ; requires user input if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed ; if not all axes are homed G28 ; home all axes G90 ; absolute positioning G1 X{move.axes[0].max/2} Y{move.axes[1].max/2} Z50 ; move X and Y axis to their center, lift Z axis 50mm above the bed M303 T0 S230 ; perform PID tuning routine for tool 0 at 230°C while heat.heaters[1].state = "tuning" ; while the tuning procedure is active M291 P"Tuning..." S1 T0 R"PID NOZZLE" ; message confirming that tuning is in progress G4 S15 ; wait for 15 seconds, then check for tuning status again until tuning procedure is finished ; Storing Results M307 H1 ; report PID tuning values for the hotend heater M500 P31 ; save results to config-override.g M104 S0 ; turn off hotend heater M291 P"PID tuning for the NOZZLE complete! Values are saved." S2 R"PID NOZZLE" ; requires user acknowledgement
The error appears after the
M702
in line 19 and the macro does not continue after -
@flobler Activate the filament sensor only when printing.
One way to do it:
Configure it using S0, I have it in the config.g. In your start .g use M591 S1, and in cancel.g and stop.g use M591 S0. -
@stephen6309 Thank you, I will try this!
But in the end, should it not only report errors while printing anyway? I thought
S1
would configure it for that according to: https://docs.duet3d.com/User_manual/Reference/Gcodes#m591-configure-filament-sensing -
@flobler When running a gcode file on the sd, it's processing, which is the same as printing.
-
@stephen6309 that makes sense, I assumed there would be a different between the status "printing" and other things the printer is busy with.
Thank you for your help, I assume what you suggested will solve my problem but I'll still update here once Itested this
-
This fixed my issue, thank you for your help @Stephen6309!
-
-