DWC 3.3RC1 - Resetting controller causes connection loop.
-
-
Standalone mode or SBC mode?
-
@dc42
Stand alone. -
@owend Does your config.g contain a reference to global.m? Might be worth posting it and any other scripts that run at startup.
-
@owend AFAIR there was a bug affecting standalone setups with a password set in an previous DWC versions. Please confirm that DWC displays version 3.3-rc1 on the Settings -> General page. If it does, please open the JS console via F12 when the connection loop occurs and check for potential errors.
If nothing unusual shows up, please share the output of
M122
too. -
@chrishamm
DWC version is
Rolling back to DWC 3.3b1 solves issue!
I get no errors at all.It all seems to relate to loading the global variables in DWC.
The constant is the error message m.global is null
I have tried checking if the globals exist or are null in config.g and added a wait G4 P10 after creating each global.
I've tried removing any spaces around global names and calculations.At times I can get it to reset without the looping, but the null global error always persists.
Happy to arrange a team viewer session if that may help debug.
This is my original config.g (before upgrading to 3.3RC1
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v2.1.4 on Sat Jan 04 2020 09:46:45 GMT+1000 (Australian Eastern Standard Time) ; serial comms / Paneldue M575 P1 B57600 S1 ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"3Dprinter" ; set printer name ; Network M554 P192.168.1.1 ; set gateway M553 P255.255.255.0 ; set netmask M552 S1 P"DARE" ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives M569 P0 S1 ; physical drive 0 (X) goes forwards M569 P1 S0 ; physical drive 1 (Y) goes backwards M569 P2 S1 ; physical drive 2 (Z) goes forwards M569 P3 S0 ; physical drive 3 (E0) goes backwards M584 X0 Y1 Z2:4 E3 ; two Z motors connected to driver outputs Z and E1 M671 X-74:240 Y79:79 S5.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis M350 X16 Y16 Z16 I1 ; Configure microstepping with interpolation for XYZ M350 E16 I1 ; Configure microstepping with interpolation for E0 M92 X100.00 Y100.00 Z400.00 ; set steps per mm XYZ M92 E854 ; set E steps/mm for Titan Aero ; axis settings M98 P"0:/sys/set_max_speeds.g" ; set all the max speeds in macro as these are adjusted during home moves so we only want to adjust in one spot M906 X1100 Y1100 Z1100 E1400 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0:215 Y0:198 Z0:180 ; X carriage moves from 0 to 200, Y bed goes from 0 to 198 ; Endstops M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch ;M558 P9 C"^zprobe.in" H6 F180:60 T2400 A10 S0.03 R0.5 B0 ; set Z probe type to bltouch and the dive height + speeds M558 P9 C"^zprobe.in" H6 F600:180 T2400 A10 S0.03 R0.5 B0 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X27 Y-2 Z0.48 ; set Z probe trigger value, offset and trigger height M557 X30:200 Y10:180 S30 ; define mesh grid ;Calculate bed centre ;global Bed_Center_X =move.compensation.probeGrid.maxs[0]-move.compensation.probeGrid.mins[0])/2) + move.compensation.probeGrid.mins[0] - sensors.probes[0].offsets[0] ;global Bed_Center_Y = (move.compensation.probeGrid.maxs[1]-move.compensation.probeGrid.mins[1])/2) + move.compensation.probeGrid.mins[y] - sensors.probes[0].offsets[1] ; Heaters M308 S0 P"bedtemp" Y"thermistor" A"Bed" B3950 C7.06e-8 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 Q10 ; create bed heater output on bedheat and map it to sensor 0 and set PWM frequency to 10hz M140 H0 ; Set bed themp to zero M143 H0 S130 A0 C0 ; set temperature limit for heater 0 to 130C - fault if too high M308 S1 P"e0temp" Y"thermistor" A"Nozzle-1" B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M143 H1 S285 A0 C0 ; set temperature limit for heater 1 to 280C - fault if too high ;echo "sensor create time: " ^ state.upTime ^ "." ^ state.msUpTime ; Set PID autotune parameters M307 H0 R0.553 C379.7 D21.16 S0.80 B0 V0 M307 H1 B0 R1.594 C358.1:217.5 D6.05 S1.00 V24.3 ;set PID values for heater 1 (hotend) ; Joystick M308 S3 P"exp.thermistor4" Y"linear-analog" A"JoyStick-X" F1 B100 C-100 ; set analog input on E3 Temp with min/max of -100 to 100 M308 S4 P"exp.thermistor6" Y"linear-analog" A"JoyStick-Y" F1 B100 C-100 ; set analog input on E5 Temp with min/max of -100 to 100 M581 T7 P7 ; set up trigger for GpIn 7 M950 J7 C"!^exp.31" ; Input 7 uses Expansion 31 pin activate pullup and inverted ; Servos and input/output M950 P5 C"exp.e5_stop" ; Output 5 uses E5_STOP pin M950 J6 C"exp.e6_stop" ; Input 6 uses E6_STOP pin ; Filament monitor M591 P1 C"e0stop" S1 D0 ; filament monitor for extruder 0 connected to E0 endstop ; Fans M950 F0 C"fan0" Q50 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"Part_Fan" S0 B2.0 H-1 ; set fan 0 name and value. Thermostatic control is turned off ; Adjust MCU temp reading to match ambient ;water pump M950 F1 C"!fan1+^exp.pb6" Q25000 ; create fan 1 (water pump) on inverted pin fan1 and set its frequency. Set RPM to E3 stop with pullup enabled M106 P1 C"Water Pump" H1 L0.5 X1 B1.2 T50:60 ; set fan 1 name and value. Thermostatic control is turned on. Monitoring hoted sensor ; water temp monitor & fan M950 F2 C"!fan2+^exp.e3_stop" Q25000 ; create fan 2 on pin fan2 and set its frequency M308 S5 P"e1temp" Y"thermistor" A"Water temp" T10000 B3950 ; Configure Water temp sensor M106 P2 C"Radiator Fan" H5 L0 X1 B1.2 T33:38 ; set fan 4 value, turn on at 30% if the water temperature reaches 30C, and increase to full speed gradually as the temperature rises to 40C ; MCU temp sensor M308 S2 P"mcu-temp" Y"mcu-temp" A"Duet Board" ; Configure MCU sensor ; Calibrate MCU temp M912 P0 S-4 ; Tools M563 P0 S"Extruder1" 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 0C ; Global Variables for heater checking routine in daemon.g while heat.heaters[1].current = 2000 ; loop until thermistor values are stable G4 P1 if iterations > 10000 ; if it takes more than 10 seconds we have a problem with the thermistor M118 P0 L1 S"Thermistor failed to stabilize in less than 10 seconds" break ;echo "sensor stable time: " ^ state.upTime ^ "." ^ state.msUpTime if !exists(global.LastTemp) global LastTemp = heat.heaters[1].current ; Set variable to current extruder temp. else set global.LastTemp = heat.heaters[1].current ; Set variable to current extruder temp. if !exists(global.LastCheckTime) global LastCheckTime = 0 ; variable for use in daemon.g else set global.LastCheckTime = 0 ; variable for use in daemon.g ;Select tool zero T0 P0 ; extrusion if !exists(global.LoadedFilament) ; global variable to hold filament name global LoadedFilament = "No_Filament" ; create a filament variable if move.extruders[state.currentTool].filament="" echo "No filament loaded. Cold extrude & retract set to defaults" M302 S190 R110 ; Allow extrusion starting from 190°C and retractions already from 110°C (defaults) set global.LoadedFilament = "No_Filament" else set global.LoadedFilament = move.extruders[state.currentTool].filament ; set the variable to the currently loaded filament echo "Loading config for " ^ global.LoadedFilament ^ " filament" M703 ; if a filament is loaded, set all the heats and speeds for it by loading config.g ; Custom settings M376 H4 ; set bed compensation taper (H4 means taper over 4mm) ; Power failure recovery M911 S22.5 R23.0 P"M42 P5 S0 M106 P0 S0 M913 X0 Y0 G91 M83 G1 Z3 E-2 F1000" ; If power drops below 22v then turn off fans, Set X & Y current to zero, raise head, retract. ; turn on LED strip driven by P5 output M42 P5 S1 ;Valve Control test to control servo position via fan speed ; Set up scaling variables {(output_end - output_start) / (input_end - input_start)} ;M950 S1 C"exp.heater4" ; assign GPIO port 0 to heater4 on expansion connector, servo mode if !exists(global.InputStart) global InputStart = 0 if !exists(global.InputEnd) global InputEnd = 1 if !exists(global.OutputStart) global OutputStart = 0 if !exists(global.OutputEnd) global OutputEnd = 180 if !exists(global.ScaleFactor) global ScaleFactor = (global.OutputEnd - global.OutputStart) / (global.InputEnd - global.InputStart) ; no need for the math in this instance but it makes it clear how you arrive at the value. if !exists(global.ServoOut) global ServoOut = floor(global.ScaleFactor * (fans[0].actualValue - global.InputStart) + 0.5) + global.OutputStart ; calculate position required on sevo - use floor() to apply rounding ;M280 P1 S{global.servo_out} ; adjust valve position to reflect fan speed. ;play startup tune G4 S8 ; Allow time for PanelDue to start & wifi connection etc M98 P"0:/macros/songs/itchyscratchy.g" ; Play tune M501 ; load config-overide.g ; configure accelerometer M955 P0 C"spi.cs3+spi.cs4" ; configure accelerometer
This is the output from the javascript window
-
This is where I'm at now.
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v2.1.4 on Sat Jan 04 2020 09:46:45 GMT+1000 (Australian Eastern Standard Time) ; serial comms / Paneldue M575 P1 B57600 S1 ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"3Dprinter" ; set printer name ; Network M554 P192.168.1.1 ; set gateway M553 P255.255.255.0 ; set netmask M552 S1 P"DARE" ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives M569 P0 S1 ; physical drive 0 (X) goes forwards M569 P1 S0 ; physical drive 1 (Y) goes backwards M569 P2 S1 ; physical drive 2 (Z) goes forwards M569 P3 S0 ; physical drive 3 (E0) goes backwards M584 X0 Y1 Z2:4 E3 ; two Z motors connected to driver outputs Z and E1 M671 X-74:240 Y79:79 S5.5 ; leadscrews at left (connected to Z) and right (connected to E1) of X axis M350 X16 Y16 Z16 I1 ; Configure microstepping with interpolation for XYZ M350 E16 I1 ; Configure microstepping with interpolation for E0 M92 X100.00 Y100.00 Z400.00 ; set steps per mm XYZ M92 E854 ; set E steps/mm for Titan Aero ; axis settings M98 P"0:/sys/set_max_speeds.g" ; set all the max speeds in macro as these are adjusted during home moves so we only want to adjust in one spot M906 X1100 Y1100 Z1100 E1400 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0:215 Y0:198 Z0:180 ; X carriage moves from 0 to 200, Y bed goes from 0 to 198 ; Endstops M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H6 F600:180 T2400 A10 S0.03 R0.5 B0 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X27 Y-2 Z0.48 ; set Z probe trigger value, offset and trigger height M557 X30:200 Y10:180 S30 ; define mesh grid ;Calculate bed centre ;global Bed_Center_X =move.compensation.probeGrid.maxs[0]-move.compensation.probeGrid.mins[0])/2) + move.compensation.probeGrid.mins[0] - sensors.probes[0].offsets[0] ;global Bed_Center_Y = (move.compensation.probeGrid.maxs[1]-move.compensation.probeGrid.mins[1])/2) + move.compensation.probeGrid.mins[y] - sensors.probes[0].offsets[1] ; Heaters M308 S0 P"bedtemp" Y"thermistor" A"Bed" B3950 C7.06e-8 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 Q10 ; create bed heater output on bedheat and map it to sensor 0 and set PWM frequency to 10hz M140 H0 ; Set bed themp to zero M143 H0 S130 A0 C0 ; set temperature limit for heater 0 to 130C - fault if too high M308 S1 P"e0temp" Y"thermistor" A"Nozzle-1" B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M143 H1 S285 A0 C0 ; set temperature limit for heater 1 to 280C - fault if too high ;echo "sensor create time: " ^ state.upTime ^ "." ^ state.msUpTime ; Set PID autotune parameters M307 H0 R0.553 C379.7 D21.16 S0.80 B0 V0 M307 H1 B0 R1.594 C358.1:217.5 D6.05 S1.00 V24.3 ;set PID values for heater 1 (hotend) ; Joystick M308 S3 P"exp.thermistor4" Y"linear-analog" A"JoyStick-X" F1 B100 C-100 ; set analog input on E3 Temp with min/max of -100 to 100 M308 S4 P"exp.thermistor6" Y"linear-analog" A"JoyStick-Y" F1 B100 C-100 ; set analog input on E5 Temp with min/max of -100 to 100 M581 T7 P7 ; set up trigger for GpIn 7 M950 J7 C"!^exp.31" ; Input 7 uses Expansion 31 pin activate pullup and inverted ; Servos and input/output M950 P5 C"exp.e5_stop" ; Output 5 uses E5_STOP pin M950 J6 C"exp.e6_stop" ; Input 6 uses E6_STOP pin ; Filament monitor M591 P1 C"e0stop" S1 D0 ; filament monitor for extruder 0 connected to E0 endstop ; Fans M950 F0 C"fan0" Q50 ; create fan 0 on pin fan0 and set its frequency M106 P0 C"Part_Fan" S0 B2.0 H-1 ; set fan 0 name and value. Thermostatic control is turned off ; Adjust MCU temp reading to match ambient ;water pump M950 F1 C"!fan1+^exp.pb6" Q25000 ; create fan 1 (water pump) on inverted pin fan1 and set its frequency. Set RPM to E3 stop with pullup enabled M106 P1 C"Water Pump" H1 L0.5 X1 B1.2 T50:60 ; set fan 1 name and value. Thermostatic control is turned on. Monitoring hoted sensor ; water temp monitor & fan M950 F2 C"!fan2+^exp.e3_stop" Q25000 ; create fan 2 on pin fan2 and set its frequency M308 S5 P"e1temp" Y"thermistor" A"Water temp" T10000 B3950 ; Configure Water temp sensor M106 P2 C"Radiator Fan" H5 L0 X1 B1.2 T33:38 ; set fan 4 value, turn on at 30% if the water temperature reaches 30C, and increase to full speed gradually as the temperature rises to 40C ; MCU temp sensor M308 S2 P"mcu-temp" Y"mcu-temp" A"Duet Board" ; Configure MCU sensor ; Calibrate MCU temp M912 P0 S-4 ; Tools M563 P0 S"Extruder1" 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 0C ; Global Variables for heater checking routine in daemon.g while heat.heaters[1].current=2000 ; loop until thermistor values are stable G4 P1 if iterations > 10000 ; if it takes more than 10 seconds we have a problem with the thermistor M118 P0 L1 S"Thermistor failed to stabilize in less than 10 seconds" break ;echo "sensor stable time: " ^ state.upTime ^ "." ^ state.msUpTime if !exists(global.LastTemp) || global.LastTemp=null global LastTemp=heat.heaters[1].current ; Set variable to current extruder temp. else set global.LastTemp=heat.heaters[1].current ; Set variable to current extruder temp. G4 P10 if !exists(global.LastCheckTime) global LastCheckTime=0 ; variable for use in daemon.g else set global.LastCheckTime=0 ; variable for use in daemon.g ;Select tool zero T0 P0 ; extrusion if !exists(global.LoadedFilament) || global.LoadedFilament=null; global variable to hold filament name global LoadedFilament="No_Filament" ; create a filament variable G4 P10 if move.extruders[state.currentTool].filament="" echo "No filament loaded. Cold extrude & retract set to defaults" M302 S190 R110 ; Allow extrusion starting from 190°C and retractions already from 110°C (defaults) set global.LoadedFilament="No_Filament" else set global.LoadedFilament=move.extruders[state.currentTool].filament ; set the variable to the currently loaded filament echo "Loading config for " ^ global.LoadedFilament ^ " filament" M703 ; if a filament is loaded, set all the heats and speeds for it by loading config.g G4 P10 ; Custom settings M376 H4 ; set bed compensation taper (H4 means taper over 4mm) ; Power failure recovery M911 S22.5 R23.0 P"M42 P5 S0 M106 P0 S0 M913 X0 Y0 G91 M83 G1 Z3 E-2 F1000" ; If power drops below 22v then turn off fans, Set X & Y current to zero, raise head, retract. ; turn on LED strip driven by P5 output M42 P5 S1 ;Valve Control test to control servo position via fan speed ; Set up scaling variables {(output_end - output_start) / (input_end - input_start)} ;M950 S1 C"exp.heater4" ; assign GPIO port 0 to heater4 on expansion connector, servo mode if !exists(global.InputStart) || global.InputStart=null global InputStart=0 else set global.InputStart=0 G4 P10 if !exists(global.InputEnd) || global.InputEnd=null global InputEnd=1 else set global.InputEnd=1 G4 P10 if !exists(global.OutputStart) || global.OutputStart=null global OutputStart=0 else set global.OutputStart=0 G4 P10 if !exists(global.OutputEnd) || global.OutputEnd=null global OutputEnd=180 else set global.OutputEnd=180 G4 P10 if !exists(global.ScaleFactor) || global.ScaleFactor=null global ScaleFactor=(global.OutputEnd - global.OutputStart) / (global.InputEnd - global.InputStart) ; no need for the math in this instance but it makes it clear how you arrive at the value. else set global.ScaleFactor=(global.OutputEnd - global.OutputStart) / (global.InputEnd - global.InputStart) G4 P10 if !exists(global.ServoOut) || global.ServoOut=null global ServoOut=floor(global.ScaleFactor * (fans[0].actualValue - global.InputStart) + 0.5) + global.OutputStart ; calculate position required on sevo - use floor to apply rounding else set global.ServoOut=floor(global.ScaleFactor * (fans[0].actualValue - global.InputStart) + 0.5) + global.OutputStart ;M280 P1 S{global.servo_out} ; adjust valve position to reflect fan speed. ;play startup tune G4 S8 ; Allow time for PanelDue to start & wifi connection etc M98 P"0:/macros/songs/itchyscratchy.g" ; Play tune M501 ; load config-overide.g ; configure accelerometer M955 P0 Q4000000 C"spi.cs3+spi.cs4" ; configure accelerometer
-
This is daemon.g (it calls on globals) but I've tried renaming it so it's not in use.
The restarts persist; 0:/sys/daemon.g ; runs continually in background at approximately 1Hz if not delayed internally ;HEATER CHECKS ; this section of daemon.g checks for heater faults ; RRF doesn't currently check for faults when idle but by default will shutdownduring printing if temperature excursion is > 15 degrees. ; Note: temp excursion value and time may be manually set using M570 ; checking if temp is rising requires a variable. ; G4 could be used but would also delay anything else in daemon.g ; this way allows other checks to run more frequently if needed however the G4 delays inside the loop will affect the frequency of daemon.g ; will be updated when variables are available in RRF. while iterations < #heat.heaters ; loop through all configured heaters if state.upTime < 60 set global.LastTemp=heat.heaters[1].current ; Set variable to current extruder temp. break; If uptime is < 60 seconds, break out so all fans etc have time to stabilise. if ((global.LastCheckTime+10) > state.upTime) ; if checked in last 10 seconds escape loop and go to rest of daemon.g if present. offset will be zero at startup via config.g ;echo "skipping loop " ^ " " ^ state.upTime ^ " " ^ global.LastCheckTime+10 if global.LastCheckTime-state.upTime > 60 ; uptime must have rolled over so reset off set to zero G10 P2 Y0 echo "upTime has rolled over. Heater checking reset" break ;echo "checking heater " ^ iterations ^ " " ^ state.upTime ^ " " ^ global.LastCheckTime+10 if heat.heaters[iterations].state="tuning" ;echo "heater " ^ iterations ^ " is tuning - no check carried out" continue ; don't check this heater as it is PID auto tuning if (heat.heaters[iterations].current) > (heat.heaters[iterations].max) ; temp is over max so emergency shutdown required ;M41 P5 S1 ; activate output connected to externally powered latching relay here to sound alarm M118 P0 S"heater over max temp fault detected in daemon.g. - shutting down" L1 M112; emergency shutdown M81 S1 ; turn off power when fans have turned off if (heat.heaters[iterations].current > 45) && (heat.heaters[iterations].active > 45); no real danger at below this temp as ambient may be close to this ;echo "heater " ^ iterations ^ " is above 45 degrees" if (heat.heaters[iterations].state!="off") && (heat.heaters[iterations].current > heat.heaters[iterations].active + 15) ; temp is > 15 degrees above target. echo "heater " ^ iterations ^ " is on or in standby - checking if temp is rising" set global.LastTemp=heat.heaters[iterations].current ; set the last check temp echo "heater " ^ iterations ^ " temp: " ^ heat.heaters[iterations].current G4 S3 ; wait 3 seconds if (heat.heaters[iterations].current > global.LastTemp + 0.5) ; heat is rising by more than 0.5 degrees in 3 seconds echo "heater runaway fault detected in daemon.g. - shutting down" if (state.status=="processing") M25 ; pause print so you might be able to save it using M119 ;M41 P5 S1 ; activate output connected to externally powered latching relay here to sound alarm M0 ; unconditional stop. If axes are homed and a print is being canceled will run cancel.g otherwise will run stop.g M81 S1 ; turn off power when fans have turned off else ;echo "heater is on or standby but temp is falling on heater " ^ iterations ^ " - no action needed" elif (heat.heaters[iterations].state="off") && ((heat.heaters[iterations].current) >= (fans[1].thermostatic.lowTemperature+0)) ; if heater is off and temp is greater than 50 there could be an issue set global.LastTemp=heat.heaters[iterations].current; ;echo "heater " ^ iterations ^ " is off but checking if temp is rising" G4 S3 ; wait 3 seconds if (heat.heaters[iterations].current > global.LastTemp + 0.5) ; heat is rising by more than 0.5 degrees in 3 seconds echo "heater is off but temp is rising on heater " ^ iterations ^ "emergency shutdown" ;M41 P5 S1 ; activate output connected to externally powered latching relay here to sound alarm echo "heater runaway fault detected in daemon.g. - shutting down" M112; emergency shutdown M81 S1 ; turn off power when fans have turned off else ;echo "heater " ^ iterations ^ " is off & temp is falling or stable on heater " ^ iterations ^ " - no action needed" else ;echo "heater " ^ iterations ^ " is below 45 degrees so check thermistor" ;"heater is below 45 degrees so only other fault may be an open circuit thermistor which should show -275 degrees" if heat.heaters[iterations].current < 0 ; we probably have a thermistor fault if heater is less than 0 degrees M112 ; emergency shutdown M81 S1 ; turn off power when fans have turned off ;Check if water pump is running correctly if (iterations=1) && ((heat.heaters[1].current) > (fans[1].thermostatic.lowTemperature+0)) if fans[1].rpm <= 500 ; Coolant pump RPM off or low G4 S3 ; check again in 3 seconds in case it's just spinning up if fans[1].rpm <= 500 echo "Water pump fault - shutting down heaters - RPM : " ^ fans[1].rpm M25 ; pause print so you might be able to save it using M119 M0 ; unconditional stop. If axes are homed and a print is being canceled will run cancel.g otherwise will run stop.g M81 S1 ; turn off power when fans have turned off elif (fans[1].rpm > 500) && (fans[1].rpm < 1400) G4 S3 ; check again in 3 seconds in case it's just spinning up if (fans[1].rpm > 500) && (fans[1].rpm < 1400) echo "WARNING: Water pump RPM low - RPM : " ^ fans[1].rpm if (state.status=="processing") M25 ; pause print so you might be able to save it using M119 ;M41 P5 S1 ; activate output connected to externally powered latching relay here to sound alarm M0 ; unconditional stop. If axes are homed and a print is being canceled will run cancel.g otherwise will run stop.g M81 S1 ; turn off power when fans have turned off else ;echo "Coolant OK - RPM : " ^ fans[1].rpm if fans[2].rpm <=1000 echo "WARNING: Water pump FAN RPM low - RPM : " ^ fans[2].rpm if (state.status=="processing") M25 ; pause print so you might be able to save it using M119 ;M41 P5 S1 ; activate output connected to externally powered latching relay here to sound alarm M0 ; unconditional stop. If axes are homed and a print is being canceled will run cancel.g otherwise will run stop.g M81 S1 ; turn off power when fans have turned off if iterations == #heat.heaters-1 ; all heaters have been checked set global.LastCheckTime=state.upTime ; set the new time to check ; END HEATER CHECKS ; run other checks ;G4 S10 ; pause daemon.g for 10 seconds before next run
This is output of M122 after reset (have to reload page to stop looping to get it)
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC1+1 (2021-05-01 21:43:27) running on Duet WiFi 1.02 or later Board ID: 08DGM-917NK-F2MS4-7J1DA-3S86T-TZTWD Used output buffers: 3 of 24 (20 max) === RTOS === Static ram: 23876 Dynamic ram: 78048 of which 0 recycled Never used RAM 9636, free system stack 184 words Tasks: NETWORK(ready,9.1%,218) ACCEL(notifyWait,0.0%,334) HEAT(delaying,0.0%,330) Move(notifyWait,0.1%,364) MAIN(running,90.3%,383) IDLE(ready,0.6%,29), total 100.0% Owned mutexes: === Platform === Last reset 00:00:52 ago, cause: software Last software reset at 2021-05-03 07:12, reason: User, GCodes spinning, available RAM 9636, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 20.0, current 20.5, max 21.0 Supply voltage: min 24.2, current 24.4, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/9, heap memory allocated/used/recyclable 2048/232/108, gc cycles 0 Driver 0: position 0, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max not available Driver 2: position 0, standstill, SG min/max not available Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 2021-05-03 07:13:07 Cache data hit count 1772122779 Slowest loop: 15.56ms; fastest: 0.18ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 1.2ms, write time 0.0ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Filament sensors === Extruder 0 sensor: ok === Network === Slowest loop: 81.90ms; fastest: 0.00ms Responder states: HTTP(2) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 - WiFi - Network state is active WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.26 WiFi MAC address bc:dd:c2:89:a0:bb WiFi Vcc 3.37, reset reason Power up WiFi flash size 4194304, free heap 23856 WiFi IP address 192.168.1.163 WiFi signal strength -58dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 4 0 0 0 0 0 0 0
-
If I watch the object model browser while performing an E-stop from DWC, I can see the root level global array become null in 3.3RC1.
Whereas in 3.3B3 it does not
-
@owend Thanks for reporting this, I've got a fix ready. It will be part of RC2.
-
@chrishamm said in DWC 3.3RC1 - Resetting controller causes connection loop.:
@owend Thanks for reporting this, I've got a fix ready. It will be part of RC2.
Just a note that this persists in 3.3RC2
Duet Web Control 3.3.0-rc2
Board: Duet 2 WiFi (2WiFi) - Stand alone
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.3RC2 (2021-05-11)
Duet WiFi Server Version: 1.26M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC2 (2021-05-11 14:55:01) running on Duet WiFi 1.02 or later Board ID: 08DGM-917NK-F2MS4-7J1DA-3S86T-TZTWD Used output buffers: 3 of 24 (20 max) === RTOS === Static ram: 23876 Dynamic ram: 78076 of which 0 recycled Never used RAM 9608, free system stack 184 words Tasks: NETWORK(ready,12.3%,206) ACCEL(notifyWait,0.0%,334) HEAT(delaying,0.0%,330) Move(notifyWait,0.1%,364) MAIN(running,87.4%,441) IDLE(ready,0.2%,29), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:03:21 ago, cause: software Last software reset at 2021-05-12 19:06, reason: User, GCodes spinning, available RAM 9608, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 22.6, current 23.2, max 23.6 Supply voltage: min 24.2, current 24.3, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 99/9, heap memory allocated/used/recyclable 2048/512/388, gc cycles 0 Driver 0: position 0, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max not available Driver 2: position 0, standstill, SG min/max not available Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 2021-05-12 19:09:46 Cache data hit count 4294967295 Slowest loop: 16.05ms; fastest: 0.18ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 1.2ms, write time 0.0ms, max retries 0 === Move === DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Filament sensors === Extruder 0 sensor: ok === Network === Slowest loop: 81.18ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 - WiFi - Network state is active WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.26 WiFi MAC address bc:dd:c2:89:a0:bb WiFi Vcc 3.37, reset reason Turned on by main processor WiFi flash size 4194304, free heap 23856 WiFi IP address 192.168.1.163 WiFi signal strength -60dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
-
@owend Thanks, I can confirm there was still a minor bug in DWC, although it does not cause disconnects any more on my setup. It will be fixed in the next version.
-
@chrishamm
Fixed in version 3.3 RC3