[RRF 3.5b2] Unload macro broken, but works when manually sent
-
Hi,
I'm trying to get my filament unload macro to work but the machine simply doesn't want to do what it's told.
This is the script:
; set extruder PREHEAT temp M568 R130 S245 ; set standby and active temperatures for active tool M568 A1 ; set tool to standby temp for filament switch M116 H1 ; Wait for temp to be reached ; Step 1 > Pause > move to a spot center-front for easy access G28 ; Home printer G91 ; relative positioning G1 Z-20 F7200 ; lower Z by 5mm G90 ; absolute positioning G1 X0 Y-110 F6000 ; and move nozzle towards the user ; Step 2 > Ask user to intervene ;M291 P"Filament swap sequence started, press okay when the hotend has reached 130 degrees Celsius" R"Filament swap initiated" ;S2 ; R is title! ; Step 3 > After checking you click okay and it starts reversing filament M302 P1 ; Allow cold extrusion M83 ; Set extruder to relative mode G1 E-620 F3000 ; Unwind the filament 620mm M568 A0 ; and turn off tool M302 P0 ; Unallow cold extrusion ; Step 4 > Notify user and offer option to place new filament ;M291 P"Remove remaining filament and click OK" R"Filament unload done" S2
The issue is that when I manually send (while hotend temp is 130C):
M302 P1and then
G1 E-620 F3000 ; Unwind the filament 620mmIt perfectly unloads filament.
First I had the message boxes in there, but I read in another topic from the previous beta (https://forum.duet3d.com/topic/30929/3-5-b1-loading-filament-via-dwc-does-not-work) that these could cause issues. So I deactivated those lines but still it doesn't want to work.
Are there any known issues with this type of script in 3.5b2?
Edit:
Excuse me, it appears this issue has been fixed by DC42:
https://github.com/Duet3D/RepRapFirmware/commit/94b33ae5404cdb67a69b51ff8099a596dfbb3940I'm assuming this fix will trickle down into the next beta.
-
@Acid Another explanation is that none of your M568 commands have a "P" parameter to specify which tool the rest of the command refers to. If no "P" parameter is given, the firmware might default to using tool 0, but then again, it might not. Assuming you only have one tool, I suggest you try adding P0 to all of your M568 commands. Let us know how you get on. Another suggestion is that you add M400 after your G1 E-620 command. This will ensure that the move completes before turning off the tool. Also, it might help if you told us exactly how and where the macro fails. You can debug it yourself by sending one command at a time.