Unsolved Filament loading bug on TC Printers
-
Hey everyone,
I am having issues with my E3D Toolchanger and loading/unloading filaments.
The issue arises when clicking the load/unload button in DWC without homing the printer first.
What happens, then, is that the printer starts to home and then picks up the corresponding tool.
After that, however, DWC throws an error "M702: no tool selected".
An even bigger problem however occurs when I now deselect the tool.
The printer now opens the coupler and then executes the tfree macro.
In practice, this means, it just drops the tool in mid air then executes the tfree macro and slams into the tooldock without a tool on it toolchanger head.I appreciate any help!
Unload Macro:
M291 P"Heating up..." R"Unloading PETG" S1 T0 G10 S180 ; Heat up the current tool to 180C M116 ; Wait for the temperatures to be reached M292 M291 P"System ready to retract... Continue?" R"Unloading PETG" S2 T0 G1 E-20 F300 ; Retract 20mm of filament at 300mm/min G1 E-200 F500 ; Retract 480mm of filament at 3000mm/min M400 ; Wait for the moves to finish M292 ; Hide the message again
tfree0 macro:
; tfree0.g ; called when tool 0 is freed ;Drop the bed G91 G1 Z5 F800 G90 if heat.heaters[1].current > 180 ;Set tool to standby M568 P0 A1 G1 X310 F40000 M98 P"brush.g" ;Move In G53 G1 Y100 F40000 G53 G1 X-12.4 Y100 F40000 G53 G1 X-12.4 Y200 F40000 G53 G1 X-12.4 Y224 F2500 G53 G1 X-12.4 Y227 F1000 ;Open Coupler M98 P"/macros/Coupler/Coupler - Unlock" ;fan off M106 P2 S0 ;Move Out G53 G1 X-12.4 Y175 F40000
-
@honolulu2107 I don't see anything in that code that would home the printer if it is not already homed. But you said above that clicking on the load filament results in something homing the printer, is that actually the case or are some of the tool change operations running with the printer not homed? If so you may be better adding a check to your various macros that will abort the operation if the printer is not homed. If you have code that is attempting to home the printer we probably need to see that to understand what is actually happening.
-
@gloomyandy Hi, and thanks for the promt reply!
Ok, i did some further testing.
The homing of the printer happens before the filament macro is being executed.
The homing must be triggered by a "select tool" command, i.e. T0 within the M702 prcess chain.
This then executes my tpre0.g macro.tpre0.g macro:
; tpre0.g ; called before tool 0 is selected ; If the printer hasn't been homed, home it if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed || !move.axes[3].homed G28 M400 ;Unlock Coupler M98 P"/macros/Coupler/Coupler - Unlock" M568 P0 A2 ;M116 S8 ;Move to location G1 X-12.4 Y175 F40000 ;Move in G1 X-12.4 Y221 F40000 ;Collect G1 X-12.4 Y227.2 F2500 ;Close Coupler M98 P"/macros/Coupler/Coupler - Lock" ;WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! ;if you are using non-standard length hotends ensure the bed is lowered enough BEFORE undocking the tool! G91 G1 Z5 F800 G90 ;Move Out G1 X-12.4 Y150 F4000
the macro is executed sucessfully and the printer picks up T0. However M702 command still fails reporting "no tool selected". The filament unload macro is never executed.
I cant explain the behaviour when deselecting the previously picked up tool. (see original post)
Just for completion, this is the tpos0 macro that is called in succession to the tpre0 macro.
; tpost0.g ; called after tool 0 has been selected ;heatup M116 P0 ;If heated up, prime and wipe if heat.heaters[1].current > 180 M98 P"purge.g" M106 R2 ; restore print cooling fan speed
-
Firmware version? Which Duet hardware?
-
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.5.1 (2024-04-19 14:40:46) running on Duet WiFi 1.02 or later + DueX5v0.11 Board ID: 0JD0M-9X6JA-JUNSN-6JKFD-3SJ6J-9UNRT Used output buffers: 18 of 26 (18 max) === RTOS === Static ram: 23256 Dynamic ram: 77784 of which 0 recycled Never used RAM 12104, free system stack 182 words Tasks: NETWORK(2,nWait 6,13.2%,220) ACCEL(6,nWait 5,0.0%,346) HEAT(3,nWait 5,0.1%,328) Move(4,nWait 5,0.0%,359) DUEX(5,nWait 5,0.0%,24) MAIN(1,running,84.7%,743) IDLE(0,ready,2.0%,29), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:00:42 ago, cause: power up Last software reset at 2024-05-19 15:12, reason: User, Gcodes spinning, available RAM 8296, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 MCU temperature: min 24.4, current 29.1, max 29.3 Supply voltage: min 24.0, current 24.3, max 24.5, 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 Events: 0 queued, 0 completed Driver 0: standstill, SG min n/a Driver 1: standstill, SG min n/a Driver 2: standstill, SG min n/a Driver 3: standstill, SG min n/a Driver 4: standstill, SG min n/a Driver 5: standstill, SG min n/a Driver 6: standstill, SG min n/a Driver 7: standstill, SG min n/a Driver 8: standstill, SG min n/a Driver 9: standstill, SG min n/a Driver 10: Driver 11: Date/time: 2024-05-23 21:21:14 Cache data hit count 1590666128 Slowest loop: 15.59ms; fastest: 0.19ms 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 3.5ms, write time 0.0ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks 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 Q0 segments left 0 Code queue 0 is empty === DueX === Read count 1, 1.42 reads/min === Network === Slowest loop: 14.28ms; fastest: 0.00ms Responder states: HTTP(2) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 === WiFi === Interface state: active Module is connected to access point Failed messages: pending 0, notrdy 0, noresp 0 Firmware version 2.1.0 MAC address 48:3f:da:a6:82:e8 Module reset reason: Power up, Vcc 3.48, flash size 2097152, free heap 37776 WiFi IP address 192.168.178.72 Signal strength -71dBm, channel 9, mode 802.11n, reconnections 0 Clock register 00002002 Socket states: 5 0 0 0 0 0 0 0
-
So i guess i should open an issue on github then?
-
undefined Phaedrux marked this topic as a question