[3.3-rc2/3] "Change filament" Does not work correctly
-
@phaedrux
M122 (after a fresh start, let me know if you need one after it actually failed to switch filaments)=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC2 (2021-05-11 14:55:01) running on Duet WiFi 1.02 or later + DueX5 Board ID: 08DGM-917NK-F2MS4-7J9F2-3S86N-TYTWF Used output buffers: 3 of 24 (22 max) === RTOS === Static ram: 23876 Dynamic ram: 79884 of which 16 recycled Never used RAM 10640, free system stack 184 words Tasks: NETWORK(ready,11.7%,222) ACCEL(notifyWait,0.0%,334) HEAT(delaying,0.0%,330) Move(notifyWait,0.1%,364) DUEX(notifyWait,0.0%,24) MAIN(running,86.7%,459) IDLE(ready,1.5%,29), total 100.0% Owned mutexes: === Platform === Last reset 00:00:18 ago, cause: power up Last software reset at 2021-05-25 18:13, reason: User, GCodes spinning, available RAM 10640, 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 19.7, current 23.7, max 23.8 Supply voltage: min 24.1, current 24.2, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, 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, standstill, SG min/max not available Driver 6: position 0, standstill, SG min/max not available Driver 7: position 0, standstill, SG min/max not available Driver 8: position 0, standstill, SG min/max not available Driver 9: position 0, standstill, SG min/max not available Driver 10: position 0 Driver 11: position 0 Date/time: 2021-05-26 15:43:14 Cache data hit count 657651640 Slowest loop: 8.13ms; 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 0.7ms, 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 === 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. === DueX === Read count 1, 3.32 reads/min === Network === Slowest loop: 15.57ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(2) 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 b4:e6:2d:52:f2:a9 WiFi Vcc 3.42, reset reason Turned on by main processor WiFi flash size 4194304, free heap 26904 WiFi IP address 192.168.1.31 WiFi signal strength -63dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
Filament
config.gM98 P"/macros/FilamentConfig/PETG/config"
load.g
M98 P"/macros/FilamentConfig/PETG/load"
unload.g
M98 P"/macros/FilamentConfig/PETG/unload"
Now the actual macros:
configM207 S0.6 F3000 Z0.0 ;firmware retraction settings for PETG M302 S220 R150 ;Cold extrusion settings ;pressure advance depending on selected tool (different hotends/extruders) if state.currentTool == 0 M572 D{tools[state.currentTool].extruders[0]} S0.0 elif state.currentTool == 1 M572 D{tools[state.currentTool].extruders[0]} S0.11 elif state.currentTool == 2 M572 D{tools[state.currentTool].extruders[0]} S0.11 elif state.currentTool == 3 M572 D{tools[state.currentTool].extruders[0]} S0.0 else M291 P"No active tool, can't enable PA" R"PA" S1
load
M98 P"/macros/Misc/Lights/On" M291 P"Heating for purge" R"Filament" S0 T115 M98 P"/macros/Toolchanging/Advanced/HomeIfNotHomed" M109 S250 M98 P"/macros/Misc/Beep" M291 P"Insert new PETG filament" R"Filament" S2 M98 P"/macros/Tool/Purge" M98 P"/macros/Tool/Cooldown" M98 P"/macros/Misc/Beep"
unload
M98 P"/macros/Misc/Lights/On" M109 S220 M98 P"/macros/Misc/Beep" M291 P"Pull out filament" R"Filament" S2 M98 P"/macros/Tool/Cooldown" M98 P"/macros/Misc/Beep"
I kinda hope you don't need all of these other macros as well...
-
-
@diamondback Thanks. Far as we know as of RC3 it should be working. @chrishamm will have to take a look at your files.
-
@phaedrux Thank you, I will update to RC3 and see if things persist.
-
@phaedrux Just had time to try again on RC3, same behavior as on RC2.
-
Would you be able to share all of your macros that are called in the filament change load and unload macros? What's actually happening is buried in there.
-
@phaedrux here you go (I replaced macro calls by the actual gcode to makes things easier to read)
unload
M42 P1 S255; lights on M109 S270 M300 S300 P300 G4 P300 M300 S400 P300 G4 P300 M300 S500 P300 M291 P"Pull out filament" R"Filament" S2 M104 S0 M300 S300 P300 G4 P300 M300 S400 P300 G4 P300 M300 S500 P300
config
M207 S0.3 F3000 Z0.0 ;firmware retraction settings for PETG M302 S250 R190 ;Cold extrusion settings
load (this is using the "PebbleWiper" concept with a variable amount of pebbles being extruded depending on if it's a filament load or a toolchange, so don't be surprised by the servo calls etc)
M42 P1 S255; lights on M291 P"Heating for purge" R"Filament" S0 T115 if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed || !move.axes[3].homed M98 P"homeall.g" M109 S270 M302 S250 R190 M300 S300 P300 G4 P300 M300 S400 P300 G4 P300 M300 S500 P300 M291 P"Insert new Nylon filament" R"Filament" S2 M280 P0 S40 if state.currentTool < 0 echo "Can't Prime & Brush, no tool selected!" M99 if heat.heaters[tools[state.currentTool].heaters[0]].current > heat.coldExtrudeTemperature M564 S0 G90 G53 G1 X-148.7 Y70 F25000 ; Move in front of brush at safe Y G53 G1 Y149 F25000 ; Quickly move in ;G53 G1 Y150 F3000 ; Slowly approach final Y position var primeRepeats = 1 if exists(var.R) set var.primeRepeats = var.R while iterations < var.primeRepeats G4 P1000 M280 P0 S40 G4 P100 M83 ;M280 P0 S85 G1 E20 F200 M106 S255 G4 P7000 G1 E-0.8 F2500 G4 P300 M280 P0 S180 M106 S0 G4 P200 G91 G1 Y-40 F20000 ; start of brush G1 Y35 F20000 ; start of brush G1 Y-45 F20000 M280 P0 S40 G1 Y-40 F25000 G1 X10 F25000 G90 M564 S1 else echo "Skipping Prime & Brush due to unheated tool" M104 S0 M300 S300 P300 G4 P300 M300 S400 P300 G4 P300 M300 S500 P300
-
Note that M109/M104 may cause tool changes so it would be better to use G10 S/R + M116 instead, just to be safe
the only reason why M701 could complain about a loaded filament is if M702 somehow deselected the tool -
@phaedrux Thanks for the hint, will change that to be sure.
Just in case it got overlooked, this specific code worked fine on previous versions, as far as I know, RC2 was the first version to break. -
Might have found the cause. As you can see, one of the last things my unload does is to display a blocking message that waits before the tool is allowed to cool down again.
The error appears in the console while the blocking message is still being displayed, ie before I confirmed it.
It reminds me of this issue: https://forum.duet3d.com/topic/23579/3-3rc3-tool-change-don-t-wait-on-m116-p/25
@dc42 is this possibly related?
-
Update, tested the RC3+7 from the linked thread, this does not solve the issue. Still sounds like a ver similar thing.
-
@diamondback Now that 3.3 final is available can you test with that?
-
@phaedrux Same thing as before, here's a screenshot showing the behavior I mentioned (error from load in the console while the dialog from unload is still being displayed)
Will remove the dialog and re-test to confirm.
-
@phaedrux Ok, yea when I remove the M291 S2 from the unload script, it "works", as in it successfully executes unload and then load.
So looks like the blocking M291 is indeed the issue here due to M701 being executed while M702 is still "active" due to the blocking dialog. -
Thanks. Will investigate.
-
@phaedrux Any news? This is still bugging my daily
-
@diamondback are you running in standalone or SBC mode?
-
@dc42 Standalone. (Duet 2 Wifi + Duex 5)
-
Any news about this @dc42 ?
-
Any news on this? Would love to get the "change" functionality back... @chrishamm @dc42