Regular periodic loss of heater values in V3.2.10
-
I am seeing regular loss of heater values for about 1 second on V3.2.10
See video
https://www.dropbox.com/s/1z4o3mstjd512wm/IMG_1560.MOV?dl=0 -
I've traced this to the fact that I am running temperature checks in daemon.g however I can't figure out what is causing the Panel Due to blink.
The blinking is only on active heaters, so must be related to the section of the macro that checks active heaters.Here is my daemon.g
The {1}'s that appear are not in the code. The forum adds them for some reason.
; 0:/sys/daemon.g ; runs continually in background at approximately 1Hz if not delayed internally ;BEGIN 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. I have used a dummy tool offset (Tool2) for this and to do elapsed time since last check ; 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 break; If uptime is < 60 seconds, break out so all fans etc have time to stabilise. if ((tools[2].offsets[1]+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 ^ " " ^ tools[2].offsets[1]+10 if tools[2].offsets[1] - 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 ^ " " ^ tools[2].offsets[1]+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 echo "heater over max temp fault detected in daemon.g. - shutting down" M112; emergency shutdown M81 S1 ; turn off power when fans have turned off if (heat.heaters[iterations].current > 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" G10 P2 X{heat.heaters[iterations].current} ; set dummy tool X offset to current temp of heater G4 S3 ; wait 3 seconds if (heat.heaters[iterations].current > tools[2].offsets[0] + 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 ;echo "heater " ^ iterations ^ " is off but checking if temp is rising" G10 P2 X{heat.heaters[iterations].current} ; set dummy tool X offset to current temp of heater G4 S3 ; wait 3 seconds if (heat.heaters[iterations].current > tools[2].offsets[0] + 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 is off & temp is falling or stable on heater " ^ iterations ^ " - no action needed" else ;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 - we don't need to check this so often, so only check on first iteration if (iterations=1) && ((heat.heaters[1].current) > (fans[1].thermostatic.lowTemperature+0)) if fans[1].rpm <= 500 ; Coolant pump RPM off or low 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) 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[5].rpm <=1000 echo "WARNING: Water pump FAN RPM low - RPM : " ^ fans[5].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 G10 P2 Y{state.upTime} ; set the new time to check again ; END HEATER CHECKS ; run other checks below this line
-
@OwenD Sorry I didn't reply earlier. Just so I get this right: the issue does not appear without your daemon.g, correct?
-
@wilriker
That is correct
It also doesn't appear if the tool is off, only when active or on standby.
My code ignores tools that are off unless the temp is rising so it must be the other sections causing it but I can't figure how or why.
There is no effect on printing except that if you try to set a temp on the Paneldue and it blinks before you finish, the value is reset to zero.
The time between blinks is approximately 10 seconds which is likely a multiple of the three second delays where I determine if the temp is rising or falling.Also updated to 3.2.11 and regressed back several versions with no change.
-
Config.g
; 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 ; set up serial connection to paneldue ; 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"XXXXXXX" ; enable network M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S0 ; disable 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 E83.151 ; set steps for bowden 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 F120 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 ; 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 ; Set PID autotune parameters M307 H0 R0.553 C379.7 D21.16 S0.80 B0 V0 M307 H1 R2.354 C140.7:139.6 D7.38 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 F5 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 P5 C"Radiator Fan" H5 L0 X1 B1.2 T30:34 ; 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 ; create dummy fan so we can use variables M950 F3 C"duex.fan3" Q0 ; create fan 3 on pin and set its frequency M106 P3 C"No_Filament" S0 X255 H-1 ; 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 ; create dummy tool so we can store some variables M563 P2 S"DummyTool" ; define dummy tool 2 G10 P2 X0 Y0 Z0 ; set tool 2 axis offsets G10 P2 R0 S0 ; set initial tool 2 active and standby temperatures to 0C ;Select tool zero T0 P0 ; extrusion 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) else echo "Filament loaded. Set values per config for filament" M703 ; if a filament is loaded, set all the heats and speeds for it by loading config.g M106 P3 C{move.extruders[state.currentTool].filament} S0 H-1 ; 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. ; Set some variables for later re-usen( not yet possible) ; var Bed_Center_Probe_Point_X =move.compensation.probeGrid.xMax-move.compensation.probeGrid.xMin)/2) + move.compensation.probeGrid.xMin - sensors.probes[0].offsets[0] ; var Bed_Center_Probe_Point_Y = (move.compensation.probeGrid.yMax-move.compensation.probeGrid.yMin)/2) + move.compensation.probeGrid.yMin - sensors.probes[0].offsets[1] ; turn on LED strip driven by P5 output M42 P5 S1 ;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
Config.overide.g
; config-override.g file generated in response to M500 at 2021-02-20 20:22 ; This is a system-generated file - do not edit ; Heater model parameters M307 H0 R0.553 C379.700:379.700 D21.16 S0.80 V0.0 B0 M307 H1 R2.417 C224.955:141.453 D6.01 S1.00 V24.3 B0 ; Workplace coordinates G10 L2 P1 X0.00 Y0.00 Z0.00 G10 L2 P2 X0.00 Y0.00 Z0.00 G10 L2 P3 X0.00 Y0.00 Z0.00 G10 L2 P4 X0.00 Y0.00 Z0.00 G10 L2 P5 X0.00 Y0.00 Z0.00 G10 L2 P6 X0.00 Y0.00 Z0.00 G10 L2 P7 X0.00 Y0.00 Z0.00 G10 L2 P8 X0.00 Y0.00 Z0.00 G10 L2 P9 X0.00 Y0.00 Z0.00 M486 S-1
M122
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.2.2 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: 23460 Dynamic ram: 74708 of which 80 recycled Never used RAM 13832, free system stack 97 words Tasks: NETWORK(ready,135) HEAT(blocked,308) MAIN(running,377) IDLE(ready,20) Owned mutexes: WiFi(NETWORK) === Platform === Last reset 07:45:00 ago, cause: software Last software reset at 2021-02-20 22:48, reason: User, GCodes spinning, available RAM 14284, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x10 Aux0 errors 0,0,0 MCU temperature: min 26.4, current 27.1, max 31.6 Supply voltage: min 24.1, current 24.3, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes Driver 0: position 1500, standstill, SG min/max 0/1023 Driver 1: position 18300, standstill, SG min/max 0/459 Driver 2: position 21160, standstill, SG min/max 0/116 Driver 3: position 0, standstill, SG min/max 0/1023 Driver 4: position 0, standstill, SG min/max 0/139 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-02-21 06:33:38 Cache data hit count 4294967295 Slowest loop: 397.12ms; fastest: 0.17ms 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.7ms, write time 391.0ms, max retries 0 === Move === DMs created 83, maxWait 713668ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 98341, completed moves 98341, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 143], 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 === 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. === Network === Slowest loop: 393.30ms; 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.25 WiFi MAC address bc:dd:c2:89:a0:bb WiFi Vcc 3.38, reset reason Power up WiFi flash size 4194304, free heap 24528 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 === Filament sensors === Extruder 0 sensor: ok
-
@wilriker
I'd hazard a guess it's got something to do with my using a dummy tool offset to store the variables for the elapsed time & last recorded temp.
These are done at similar intervals (or at least a multiple of)
Not sure why that would cause a refresh of the Paneldue temps though.
If that turns out to be the case, I wouldn't lose too much sleep over it as it'll rectify itself when we get variables. -
@OwenD Usually PanelDueFirmware reacts only passively on status updates sent by/requested from RRF. It does not make any assumptions (with the exception for the caption of the Reprint/Resimulate button). So this means it does see that this tool's state, the heater state as well as the active/current temps are being set to be all default temporarily while current temp stays as is.
As for why your
daemon.g
resets all of these values, I don't know yet. -
Hey @OwenD,
since 3.2.10 quite some changes were made to paneldue's firmware. please re-test the issue reported and open a new thread if your problem persists.
https://forum.duet3d.com/topic/24889/paneldue-3-4-0-pre1-released/6