3.2-RC2 DSF error in if statement
-
I have inconsistent errors when when checking with a if statement if a sensor value is 0 or 1. It almost always fails at the second if statement.
Running 6HC+3HC+SBC on RPi4 with 3.2RC2.debug] Completed M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Finished codes from macro file /sys/custom/EndStop_X-Max_Deactivate.g [info] Finished macro file /sys/custom/EndStop_X-Max_Deactivate.g [debug] Updated key move [debug] Requesting update of key sensors, seq 38 -> 40 [debug] HTTP: ==> Unfinished starting code: M98 P"/sys/custom/EndStop_X-Max_Deactivate.g" ; Don't use the X max as EmergencyStop. [debug] HTTP: Disposing macro file /sys/custom/EndStop_X-Max_Deactivate.g [debug] HTTP: Sent G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. , remaining space 1488, needed 48 [debug] HTTP: -> Resumed suspended code [debug] HTTP: Sent G53 G0 X590 F30000 ; Fast Move to the pickup position with tool., remaining space 1448, needed 40 [debug] HTTP: -> Resumed suspended code [debug] HTTP: Sent G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0., remaining space 1408, needed 40 [debug] HTTP: -> Resumed suspended code [debug] HTTP: Sent M98 P"/sys/custom/tool_lock.g" ; Lock the tool, remaining space 1352, needed 56 [debug] HTTP: -> Resumed suspended code [debug] Completed M98 P"/sys/custom/EndStop_X-Max_Deactivate.g" ; Don't use the X max as EmergencyStop. [debug] Updated key sensors [debug] HTTP: Sent G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. , remaining space 1312, needed 40 [debug] HTTP: -> Resumed suspended code [debug] HTTP: Sent G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates), remaining space 1276, needed 36 [debug] HTTP: -> Resumed suspended code [debug] HTTP: Sent M400 ; Wait for current moves to finish, remaining space 1252, needed 24 [info] Aborted macro file tpost49.g [debug] Cancelled ; Move nozzle to purge area System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 432 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled M98 P"/sys/custom/tool_lock.g" ; Lock the tool System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled ;Lock the tool System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 432 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled ; Check so the tool is mounted steady. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 432 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled M400 ; Wait for current moves to finish System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350
Macro I run:
; Mounting ; runs after firmware thinks Tool49 is selected ; Note: tool offsets are applied at this point! ; Note that commands prefixed with G53 will NOT apply the tool offset. ; Check so no tool is mounted before trying to mount one. if sensors.gpIn[3].value!=1 abort "tpost49.g: Tool already picked up. Manually return tool to the dock" G91 ; relative positioning G1 H2 Z+5 F6000 ; Lift z so we don't crash G90 ; Return to absolute ; Set Z Probe settings M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe M400 ; Wait for current moves to finish M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools M98 P"/sys/custom/EndStop_X-Max_Deactivate.g" ; Don't use the X max as EmergencyStop. G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. ;Lock the tool M98 P"/sys/custom/tool_lock.g" ; Lock the tool ; Move nozzle to purge area G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) M400 ; Wait for current moves to finish ; Check so the tool is mounted steady. echo sensors.gpIn[3].value if sensors.gpIn[3].value!=0 M118 S"value not 0" echo "value not 0" M118 S"Value checked and outside if" ; Prepare for probing M208 X500 ; Set axis software limits and min/max switch-triggering positions. Extended with tools M98 P"/sys/custom/EndStop_X-Max_Activate.g" ; Use the X max as EmergencyStop. ;M118 S"tpost49.g: Tool not picked up correctly." ;abort "tpost49.g: Tool not picked up correctly."
=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.2-RC2 running on Duet 3 MB6HC v0.6 or 1.0 (SBC mode) Board ID: 08DJM-956L2-G43S4-6JKDD-3SJ6L-TB62G Used output buffers: 1 of 40 (14 max) === RTOS === Static ram: 149788 Dynamic ram: 64004 of which 164 recycled Never used RAM 144876, free system stack 126 words Tasks: Linux(blocked,85) HEAT(blocked,277) CanReceiv(blocked,801) CanSender(blocked,348) CanClock(blocked,352) TMC(blocked,19) MAIN(running,1171) IDLE(ready,19) Owned mutexes: HTTP(MAIN) === Platform === Last reset 05:11:25 ago, cause: software Last software reset at 2020-12-27 18:30, reason: User, none spinning, available RAM 145012, slot 2 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task Linu Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 MCU temperature: min 40.5, current 44.6, max 44.8 Supply voltage: min 27.9, current 31.9, max 32.0, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0 Driver 0: position 177935, standstill, reads 49087, writes 56 timeouts 0, SG min/max 0/158 Driver 1: position 13312, standstill, reads 49087, writes 56 timeouts 0, SG min/max 0/156 Driver 2: position 3200, standstill, reads 48928, writes 215 timeouts 0, SG min/max 0/103 Driver 3: position 0, standstill, reads 49093, writes 51 timeouts 0, SG min/max 0/146 Driver 4: position 0, standstill, reads 49093, writes 51 timeouts 0, SG min/max 0/206 Driver 5: position 0, standstill, reads 49093, writes 51 timeouts 0, SG min/max 0/146 Date/time: 2020-12-27 23:42:01 Slowest loop: 111.58ms; fastest: 0.05ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 8347994ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 371, completed moves 371, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 101], 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 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP* is doing "M122" 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 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === CAN === Messages queued 74891, send timeouts 0, received 224338, lost 0, longest wait 1ms for reply type 6018, free buffers 48 === SBC interface === State: 4, failed transfers: 0 Last transfer: 1ms ago RX/TX seq numbers: 43789/43789 SPI underruns 0, overruns 0 Number of disconnects: 1, IAP RAM available 0x2c85c Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.2.0-rc2 Code buffer space: 4096 Configured SPI speed: 8000000 Hz Full transfers per second: 35.78 Maximum length of RX/TX data transfers: 3388/576
-
I'm sorry but I'm having trouble reproducing this problem. I created a new sensor pin on my setup and call
abort
only if a given condition is met (a GPIO value like in your macro). This check cancels the running macro files only if the condition is true. Can you please provide a generic macro file to reproduce this problem? Also, can you confirm that the axes are always homed beforeG53 G0
is called? If any axes are unhomed at that point, G0/G1 will abort the running files too. -
@chrishamm I am also having a hard time with this but I have a feeling it is from the execution order of nested and macros on multiple levels. Having problems elsewhere too. I am trying to make a generic macro.
-
@TypQxQ I haven't observed a similar problem on other machines either so I wonder if it's a problem with your particular macro. Perhaps you check the sensor when movement hasn't finished? Try running M400 before you check the sensor state.
-
TstNest-1.g TstNest-0.g @chrishamm said in 3.2-RC2 DSF error in if statement:
Perhaps you check the sensor when movement hasn't finished?
I do use M400 in the code above.
I have commented out all moves and it almost always crashes, but not always. The attached code crashes most of the time.Sometimes it crashes more often if run in quick succession but not if called quickly from another macro multiple times.
If I remove the commented lines or I comment out the M98 lines it will also run fine. Could it be something inside the macro parsing code?
[debug] Completed ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Completed ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [info] Aborted macro file 0:/macros/TstNest-0.g [debug] Cancelled ; Check so the tool is mounted steady. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 432 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled M582 T4 System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Completed M400 ; Wait for current moves to finish
I attach the code as files downloaded from the DWC so nothing is lost in case some obscure sign I can't find messes things up.
TstNest-0.g
TstNest-1.g
trigger4.g -
@TypQxQ said in 3.2-RC2 DSF error in if statement:
[debug] HTTP: Sent G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. , remaining space 1488, needed 48
Right at the beginning of the first macro you shared in your main post I cannot see an M400 before the if-clause but it may be unrelated. It's hard to believe that codes could be still executed in the wrong order but DSF might swallow an error message from G0 (that's the last code sent to RRF before the files are aborted). Can you try to connect a USB serial console to the Duet and check for potential error messages that do not show up via DWC/DSF?
-
The code I shared always runs until the second if-clause. It is there the code sometimes stops.
I've activated serial debug:
Debugging enabled for modules: Platform(0) GCodes(3) Move(4) PrintMonitor(9) PortControl(11) DuetExpansion(12) LinuxInterface(16) Debugging disabled for modules: Network(1) Webserver(2) Heat(5) DDA(6) Roland(7) Scanner(8) Storage(10) FilamentSensors(13) WiFi(14) Display(15) CAN(17)
Successfull run of macro:
Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9 HTTP: M98 P"0:/macros/TstNest-0.g" Requesting macro file '0:/macros/TstNest-0.g' (fromCode: true) HTTP: M950 J3 C"0.io3.in" HTTP: M581 P3 T4 S1 HTTP: G91 HTTP: G90 HTTP: M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.020000 HTTP: G31 Z-1 HTTP: M400 HTTP: M98 P"/macros/TstNest-1.g" Requesting macro file '/macros/TstNest-1.g' (fromCode: true) HTTP: M950 J14 C"nil" Macro completed on channel 0 HTTP: M400 HTTP: M582 T4 Requesting macro file 'trigger4.g' (fromCode: false) Trigger: M118 S"Carriage coupling failed!" Carriage coupling failed! Macro completed on channel 5 HTTP: M118 S"Value checked and outside if" Value checked and outside if HTTP: M208 X500 HTTP: M98 P"/macros/TstNest-1.g" Requesting macro file '/macros/TstNest-1.g' (fromCode: true) Requesting non-blocking macro file 'daemon.g' (fromCode: false) HTTP: M950 J14 C"nil" Macro completed on channel 9 Macro completed on channel 0 Macro completed on channel 0 Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9
And a unsuccessfull one right after (no moves or other changes inbetween):
Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9 Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9 HTTP: M98 P"0:/macros/TstNest-0.g" Requesting macro file '0:/macros/TstNest-0.g' (fromCode: true) HTTP: M950 J3 C"0.io3.in" HTTP: M581 P3 T4 S1 HTTP: G91 HTTP: G90 HTTP: M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.020000 HTTP: G31 Z-1 HTTP: M400 HTTP: M98 P"/macros/TstNest-1.g" Requesting macro file '/macros/TstNest-1.g' (fromCode: true) Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9 HTTP: M950 J14 C"nil" Macro completed on channel 0 HTTP: M400 HTTP: M582 T4 Requesting macro file 'trigger4.g' (fromCode: false) Trigger: M118 S"Carriage coupling failed!" Carriage coupling failed! Macro completed on channel 0 Macro completed on channel 5 Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9 Requesting non-blocking macro file 'daemon.g' (fromCode: false) Macro completed on channel 9
Because the scripts checks for a open endstop and has no moves you can try it on any board.
And my Status:
=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.2-RC2 running on Duet 3 MB6HC v0.6 or 1.0 (SBC mode) Board ID: 08DJM-956L2-G43S4-6JKDD-3SJ6L-TB62G Used output buffers: 1 of 40 (17 max) === RTOS === Static ram: 149788 Dynamic ram: 65076 of which 124 recycled Never used RAM 143844, free system stack 126 words Tasks: Linux(blocked,79) HEAT(blocked,277) CanReceiv(blocked,801) CanSender(blocked,346) CanClock(blocked,352) TMC(blocked,19) MAIN(running,720) IDLE(ready,19) Owned mutexes: HTTP(MAIN) === Platform === Last reset 09:18:44 ago, cause: software Last software reset at 2020-12-30 22:04, reason: User, none spinning, available RAM 144312, slot 0 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task Linu Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 MCU temperature: min 44.3, current 44.5, max 46.0 Supply voltage: min 31.9, current 31.9, max 32.0, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0 Driver 0: position 176657, standstill, reads 55500, writes 0 timeouts 0, SG min/max not available Driver 1: position 12028, standstill, reads 55500, writes 0 timeouts 0, SG min/max not available Driver 2: position 12800, standstill, reads 55499, writes 0 timeouts 0, SG min/max not available Driver 3: position 0, standstill, reads 55499, writes 0 timeouts 0, SG min/max not available Driver 4: position 0, standstill, reads 55500, writes 0 timeouts 0, SG min/max not available Driver 5: position 0, standstill, reads 55500, writes 0 timeouts 0, SG min/max not available Date/time: 2020-12-31 07:22:56 Slowest loop: 92.19ms; fastest: 0.08ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 0ms, bed compensation in use: mesh, comp offset 0.000 === MainDDARing === Scheduled moves 103, completed moves 103, 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 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP* is doing "M122" 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 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === CAN === Messages queued 5914, send timeouts 0, received 17726, lost 0, longest wait 1ms for reply type 6036, free buffers 48 === SBC interface === State: 4, failed transfers: 0 Last transfer: 1ms ago RX/TX seq numbers: 18008/18008 SPI underruns 0, overruns 0 Number of disconnects: 1, IAP RAM available 0x2c85c Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.2.0-rc2 Code buffer space: 4096 Configured SPI speed: 8000000 Hz Full transfers per second: 35.66 Maximum length of RX/TX data transfers: 3464/292
-
Interesting, thanks again for the logs. Can you check if
return
terminates the current macro file as expected? -
@chrishamm I couldn't find a reference to the return command but I put it last in the if construct:
if sensors.gpIn[3].value!=0 echo "value not 0" return else echo "else here"
In the first one it has no effect on the code but on the other one I get
Error: Failed to evaluate "": expected an expression of TstNest-0.g
But not always. When it does throw the exception it looks like this:[debug] IPC#29: Got new UNIX connection, checking permissions... [debug] IPC#29: Granting full DSF permissions to external plugin [debug] IPC#29: Command processor added [debug] IPC#29: Received command SimpleCode [debug] Waiting for execution of M98 P"0:/macros/TstNest-0.g" [debug] Processing M98 P"0:/macros/TstNest-0.g" [debug] Waiting for finish of M98 P"0:/macros/TstNest-0.g" [debug] HTTP: Sent M98 P"0:/macros/TstNest-0.g", remaining space 1480, needed 56 [info] Starting macro file 0:/macros/TstNest-0.g on channel HTTP [debug] Waiting for execution of M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. (macro code) [debug] Waiting for execution of M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) (macro code) [debug] Waiting for execution of ; Mounting (macro code) [debug] Waiting for execution of ; runs after firmware thinks Tool49 is selected (macro code) [debug] Waiting for execution of ; Note: tool offsets are applied at this point! (macro code) [debug] Waiting for execution of ; Note that commands prefixed with G53 will NOT apply the tool offset. (macro code) [debug] Waiting for execution of ; Check so no tool is mounted before trying to mount one. (macro code) [debug] HTTP: ==> Starting code M98 P"0:/macros/TstNest-0.g" [debug] Processing M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Waiting for finish of M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Processing M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Waiting for finish of M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Processing ; Mounting [debug] Waiting for finish of ; Mounting [debug] Processing ; runs after firmware thinks Tool49 is selected [debug] Waiting for finish of ; runs after firmware thinks Tool49 is selected [debug] Processing ; Note: tool offsets are applied at this point! [debug] Waiting for finish of ; Note: tool offsets are applied at this point! [debug] Processing ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Waiting for finish of ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Processing ; Check so no tool is mounted before trying to mount one. [debug] Waiting for finish of ; Check so no tool is mounted before trying to mount one. [debug] HTTP: Sent M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check., remaining space 1488, needed 48 [debug] HTTP: Sent M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g), remaining space 1440, needed 48 [debug] Completed M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Completed ; Mounting [debug] Completed M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Completed ; runs after firmware thinks Tool49 is selected [debug] Completed ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Completed ; Note: tool offsets are applied at this point! [debug] Completed ; Check so no tool is mounted before trying to mount one. [debug] Evaluating If block [debug] Evaluating 3 on channel HTTP [debug] Evaluating sensors.gpIn[3].value!=1 on channel HTTP [debug] Evaluation result: (sensors.gpIn[3].value!=1) = False [debug] End of If block [debug] Waiting for execution of G91 ; relative positioning (macro code) [debug] Waiting for execution of ;G1 H2 Z+5 F6000 ; Lift z so we don't crash (macro code) [debug] Processing G91 ; relative positioning [debug] Waiting for execution of G90 ; Return to absolute (macro code) [debug] Waiting for finish of G91 ; relative positioning [debug] Waiting for execution of ; Set Z Probe settings (macro code) [debug] Processing ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Waiting for finish of ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Waiting for execution of M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe (macro code) [debug] Processing G90 ; Return to absolute [debug] Waiting for execution of G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe (macro code) [debug] Waiting for finish of G90 ; Return to absolute [debug] Waiting for execution of M400 ; Wait for current moves to finish (macro code) [debug] Processing ; Set Z Probe settings [debug] Waiting for execution of ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools (macro code) [debug] Waiting for finish of ; Set Z Probe settings [debug] Waiting for execution of M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. (macro code) [debug] Processing M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Waiting for execution of ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. (macro code) [debug] Waiting for finish of M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Waiting for execution of ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. (macro code) [debug] Processing G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Waiting for execution of ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. (macro code) [debug] Waiting for finish of G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Waiting for execution of ;Lock the tool (macro code) [debug] Processing M400 ; Wait for current moves to finish [debug] Waiting for execution of ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool (macro code) [debug] Waiting for finish of M400 ; Wait for current moves to finish [debug] Waiting for execution of ; Move nozzle to purge area (macro code) [debug] Processing ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] Waiting for execution of ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (macro code) [debug] Waiting for finish of ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] HTTP: Sent G91 ; relative positioning, remaining space 1512, needed 24 [debug] HTTP: Sent G90 ; Return to absolute, remaining space 1488, needed 24 [debug] Processing M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] HTTP: Sent M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe, remaining space 1400, needed 88 [debug] HTTP: Sent G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe, remaining space 1368, needed 32 [debug] HTTP: Sent M400 ; Wait for current moves to finish, remaining space 1344, needed 24 [debug] Waiting for finish of M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Processing ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Waiting for finish of ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Processing ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] Waiting for finish of ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] HTTP: Sent M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop., remaining space 1292, needed 52 [debug] Processing ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Waiting for finish of ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Processing ;Lock the tool [debug] Waiting for finish of ;Lock the tool [debug] Processing ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Waiting for finish of ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Processing ; Move nozzle to purge area [debug] Waiting for finish of ; Move nozzle to purge area [debug] Processing ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Waiting for finish of ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Completed G91 ; relative positioning [debug] Completed ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Completed G90 ; Return to absolute [debug] Completed ; Set Z Probe settings [debug] Waiting for execution of ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) (macro code) [debug] Waiting for execution of M400 ; Wait for current moves to finish (macro code) [debug] Waiting for execution of M582 T4 (macro code) [debug] Processing ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] Waiting for execution of ; Check so the tool is mounted steady. (macro code) [debug] Waiting for finish of ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] Completed M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Processing M400 ; Wait for current moves to finish [debug] Waiting for execution of echo sensors.gpIn[3].value (macro code) [debug] Waiting for finish of M400 ; Wait for current moves to finish [debug] Completed G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Processing M582 T4 [debug] Completed M400 ; Wait for current moves to finish [debug] Waiting for finish of M582 T4 [debug] Completed ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] Processing ; Check so the tool is mounted steady. [debug] Waiting for finish of ; Check so the tool is mounted steady. [debug] Processing echo sensors.gpIn[3].value [info] Starting macro file /macros/TstNest-1.g on channel HTTP [debug] HTTP: ==> Starting code M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Waiting for execution of M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. (macro code) [debug] Processing M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Requesting update of key inputs, seq 311 -> 312 [debug] Waiting for finish of M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] HTTP: Sent M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max., remaining space 1492, needed 44 [debug] Completed M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Finished codes from macro file /macros/TstNest-1.g [info] Finished macro file /macros/TstNest-1.g [debug] Updated key inputs [debug] Requesting update of key sensors, seq 250 -> 252 [debug] HTTP: ==> Unfinished starting code: M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] HTTP: Disposing macro file /macros/TstNest-1.g [debug] HTTP: Sent M400 ; Wait for current moves to finish, remaining space 1516, needed 20 [debug] Updated key sensors [debug] Completed M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] HTTP: Sent M582 T4, remaining space 1488, needed 28 [debug] Completed ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Completed ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] Completed ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Completed ;Lock the tool [debug] Completed ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Completed ; Move nozzle to purge area [debug] Completed ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Completed ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] Completed M400 ; Wait for current moves to finish [debug] Completed M582 T4 [debug] Completed ; Check so the tool is mounted steady. [info] Starting macro file trigger4.g on channel Trigger [debug] Waiting for execution of M118 S"Carriage coupling failed!" (macro code) [debug] Processing M118 S"Carriage coupling failed!" [debug] Waiting for execution of ;M118 S"Carriage coupling failed!!!!" L1 (macro code) [debug] Waiting for finish of M118 S"Carriage coupling failed!" [debug] Trigger: Sent M118 S"Carriage coupling failed!", remaining space 1476, needed 60 [debug] Processing ;M118 S"Carriage coupling failed!!!!" L1 [debug] Waiting for finish of ;M118 S"Carriage coupling failed!!!!" L1 [debug] Evaluating 3 on channel HTTP [debug] Evaluating sensors.gpIn[3].value on channel HTTP [info] Carriage coupling failed! [debug] Completed ;M118 S"Carriage coupling failed!!!!" L1 [debug] Completed M118 S"Carriage coupling failed!" [debug] Finished codes from macro file trigger4.g [info] Finished macro file trigger4.g [debug] Waiting for finish of echo sensors.gpIn[3].value [debug] Completed echo sensors.gpIn[3].value [debug] Evaluating If block [debug] Evaluating 3 on channel HTTP [debug] Trigger: Disposing macro file trigger4.g [debug] Evaluating sensors.gpIn[3].value!=0 on channel HTTP [debug] Evaluation result: (sensors.gpIn[3].value!=0) = True [debug] Waiting for execution of echo "value not 0" (macro code) [debug] Doing Return [debug] Processing echo "value not 0" [debug] Waiting for execution of return (macro code) [debug] Evaluating "value not 0" on channel HTTP [debug] Waiting for finish of echo "value not 0" [debug] Completed echo "value not 0" [debug] Processing return [debug] Evaluating on channel HTTP [debug] Requesting update of key inputs, seq 312 -> 313 [error] Code return has thrown an exception DuetAPI.Commands.CodeParserException: Failed to evaluate "": expected an expression ---> DuetAPI.Commands.CodeParserException: expected an expression at DuetControlServer.Model.Expressions.EvaluateSubExpression(Code code, String expression, Boolean onlyLinuxFields, Boolean encodeResult) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 574 at DuetControlServer.Model.Expressions.EvaluateExpression(Code code, String expression, Boolean onlyLinuxFields, Boolean encodeResult) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 426 at DuetControlServer.Model.Expressions.Evaluate(Code code, Boolean evaluateAll) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 288 --- End of inner exception stack trace --- at DuetControlServer.Model.Expressions.Evaluate(Code code, Boolean evaluateAll) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 293 at DuetControlServer.Commands.Code.ProcessInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 539 at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 429 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [info] Aborted macro file 0:/macros/TstNest-0.g [error] Failed to evaluate "": expected an expression of TstNest-0.g [debug] DuetAPI.Commands.CodeParserException: Failed to evaluate "": expected an expression ---> DuetAPI.Commands.CodeParserException: expected an expression at DuetControlServer.Model.Expressions.EvaluateSubExpression(Code code, String expression, Boolean onlyLinuxFields, Boolean encodeResult) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 574 at DuetControlServer.Model.Expressions.EvaluateExpression(Code code, String expression, Boolean onlyLinuxFields, Boolean encodeResult) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 426 at DuetControlServer.Model.Expressions.Evaluate(Code code, Boolean evaluateAll) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 288 --- End of inner exception stack trace --- at DuetControlServer.Model.Expressions.Evaluate(Code code, Boolean evaluateAll) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Model/Expressions.cs:line 293 at DuetControlServer.Commands.Code.ProcessInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 539 at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 429 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 403 at DuetControlServer.Commands.Code.<Execute>b__27_0(Task`1 task) in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 289 at DuetControlServer.FileExecution.Macro.Run() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/FileExecution/Macro.cs:line 336 [debug] Finished codes from macro file 0:/macros/TstNest-0.g [debug] HTTP: ==> Unfinished starting code: M98 P"0:/macros/TstNest-0.g" [debug] HTTP: Disposing macro file 0:/macros/TstNest-0.g [debug] Updated key inputs [debug] Completed M98 P"0:/macros/TstNest-0.g" => 1 value not 0 [debug] IPC#29: Connection closed [debug] IPC#30: Got new UNIX connection, checking permissions... [debug] IPC#30: Granting full DSF permissions to external plugin [debug] IPC#30: Command processor added [debug] IPC#30: Received command ResolvePath [debug] IPC#30: Connection closed
Hope this helps and Happy New Year
-
@TypQxQ Thanks and happy new year! I've got a fix ready for those issues.
-
I updated to the stable 3.2 release of today but unfortunately it still doesn't work.
[debug] IPC#50: Got new UNIX connection, checking permissions... [debug] IPC#50: Granting full DSF permissions to external plugin [debug] IPC#50: Command processor added [debug] IPC#50: Received command SimpleCode [debug] Waiting for execution of M98 P"0:/macros/TstNest-0.g" [debug] Processing M98 P"0:/macros/TstNest-0.g" [debug] Waiting for finish of M98 P"0:/macros/TstNest-0.g" [debug] HTTP: Sent M98 P"0:/macros/TstNest-0.g", remaining space 1480, needed 56 [info] Starting macro file 0:/macros/TstNest-0.g on channel HTTP [debug] Waiting for execution of M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. (macro code) [debug] HTTP: ==> Starting code M98 P"0:/macros/TstNest-0.g" [debug] Processing M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Waiting for execution of M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) (macro code) [debug] Waiting for execution of ; Mounting (macro code) [debug] Waiting for execution of ; runs after firmware thinks Tool49 is selected (macro code) [debug] Waiting for execution of ; Note: tool offsets are applied at this point! (macro code) [debug] Waiting for execution of ; Note that commands prefixed with G53 will NOT apply the tool offset. (macro code) [debug] Waiting for execution of ; Check so no tool is mounted before trying to mount one. (macro code) [debug] Waiting for finish of M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Processing M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Waiting for finish of M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Processing ; Mounting [debug] Waiting for finish of ; Mounting [debug] Processing ; runs after firmware thinks Tool49 is selected [debug] Waiting for finish of ; runs after firmware thinks Tool49 is selected [debug] Processing ; Note: tool offsets are applied at this point! [debug] Waiting for finish of ; Note: tool offsets are applied at this point! [debug] Processing ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Waiting for finish of ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Processing ; Check so no tool is mounted before trying to mount one. [debug] Waiting for finish of ; Check so no tool is mounted before trying to mount one. [debug] HTTP: Sent M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check., remaining space 1488, needed 48 [debug] HTTP: Sent M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g), remaining space 1440, needed 48 [debug] Completed M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. [debug] Completed M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g) [debug] Completed ; Mounting [debug] Completed ; runs after firmware thinks Tool49 is selected [debug] Completed ; Note: tool offsets are applied at this point! [debug] Completed ; Note that commands prefixed with G53 will NOT apply the tool offset. [debug] Completed ; Check so no tool is mounted before trying to mount one. [debug] Evaluating If block [debug] Evaluating 3 on channel HTTP [debug] Evaluating sensors.gpIn[3].value!=1 on channel HTTP [debug] Evaluation result: (sensors.gpIn[3].value!=1) = False [debug] End of If block [debug] Waiting for execution of G91 ; relative positioning (macro code) [debug] Waiting for execution of ;G1 H2 Z+5 F6000 ; Lift z so we don't crash (macro code) [debug] Processing G91 ; relative positioning [debug] Waiting for execution of G90 ; Return to absolute (macro code) [debug] Waiting for finish of G91 ; relative positioning [debug] Waiting for execution of ; Set Z Probe settings (macro code) [debug] Processing ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Waiting for finish of ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Processing G90 ; Return to absolute [debug] Waiting for execution of M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe (macro code) [debug] Waiting for finish of G90 ; Return to absolute [debug] Processing ; Set Z Probe settings [debug] Waiting for finish of ; Set Z Probe settings [debug] Waiting for execution of G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe (macro code) [debug] Processing M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Waiting for finish of M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Waiting for execution of M400 ; Wait for current moves to finish (macro code) [debug] Processing G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Waiting for finish of G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Processing M400 ; Wait for current moves to finish [debug] Waiting for finish of M400 ; Wait for current moves to finish [debug] Waiting for execution of ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools (macro code) [debug] Processing ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] Waiting for finish of ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] Waiting for execution of M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. (macro code) [debug] Processing M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Waiting for finish of M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Waiting for execution of ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. (macro code) [debug] Processing ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Waiting for finish of ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Waiting for execution of ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. (macro code) [debug] Processing ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] Waiting for finish of ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] Waiting for execution of ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. (macro code) [debug] Processing ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Waiting for finish of ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Waiting for execution of ;Lock the tool (macro code) [debug] Processing ;Lock the tool [debug] Waiting for finish of ;Lock the tool [debug] Waiting for execution of ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool (macro code) [debug] Processing ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Waiting for execution of ; Move nozzle to purge area (macro code) [debug] Waiting for finish of ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Processing ; Move nozzle to purge area [debug] Waiting for finish of ; Move nozzle to purge area [debug] Waiting for execution of ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (macro code) [debug] Processing ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Waiting for finish of ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] HTTP: Sent G91 ; relative positioning, remaining space 1512, needed 24 [debug] HTTP: Sent G90 ; Return to absolute, remaining space 1488, needed 24 [debug] HTTP: Sent M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe, remaining space 1400, needed 88 [debug] HTTP: Sent G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe, remaining space 1368, needed 32 [debug] HTTP: Sent M400 ; Wait for current moves to finish, remaining space 1344, needed 24 [debug] HTTP: Sent M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop., remaining space 1292, needed 52 [debug] Completed G91 ; relative positioning [debug] Waiting for execution of ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) (macro code) [info] Starting macro file /macros/TstNest-1.g on channel HTTP [debug] Processing ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] HTTP: ==> Starting code M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Completed ;G1 H2 Z+5 F6000 ; Lift z so we don't crash [debug] Waiting for execution of M400 ; Wait for current moves to finish (macro code) [debug] Completed G90 ; Return to absolute [debug] Waiting for execution of M582 T4 (macro code) [debug] Completed ; Set Z Probe settings [debug] Waiting for execution of ; Check so the tool is mounted steady. (macro code) [debug] Completed M558 P8 C"1.io2.in" F250 H5 T24000 A2 S0.02 ; Set the pin of Z probe [debug] Waiting for execution of M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. (macro code) [debug] Waiting for execution of echo sensors.gpIn[3].value (macro code) [debug] Completed G31 Z-1 ; Set probe height as -1 so 0 is 1mm below the probe [debug] Processing M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Completed M400 ; Wait for current moves to finish [debug] Completed ;M208 X600 ; Set axis software limits and min/max switch-triggering positions. Extended with tools [debug] Requesting update of key inputs, seq 40 -> 41 [debug] Waiting for finish of ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] Waiting for finish of M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Processing M400 ; Wait for current moves to finish [debug] Waiting for finish of M400 ; Wait for current moves to finish [debug] Processing M582 T4 [debug] Waiting for finish of M582 T4 [debug] Processing ; Check so the tool is mounted steady. [debug] Waiting for finish of ; Check so the tool is mounted steady. [debug] Processing echo sensors.gpIn[3].value [debug] HTTP: Sent M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max., remaining space 1492, needed 44 [debug] Completed M950 J14 C"nil" ; Don't use the input pin on io4 on the exp1 board as X max. [debug] Finished codes from macro file /macros/TstNest-1.g [info] Finished macro file /macros/TstNest-1.g [debug] Updated key inputs [debug] Requesting update of key sensors, seq 37 -> 39 [debug] HTTP: ==> Unfinished starting code: M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] HTTP: Disposing macro file /macros/TstNest-1.g [debug] Completed M98 P"/macros/TstNest-1.g" ; Don't use the X max as EmergencyStop. [debug] Completed ;G53 G0 X590 F30000 ; Fast Move to the pickup position with tool. [debug] Completed ;G53 G0 X598 F3000 ; Slow Move to the pickup position with tool-0. [debug] Completed ;Lock the tool [debug] Completed ;G53 G0 X500 Y515 F20000 ; Rapid to the approach position with tool-0. (park_x, park_y - offset). Y next to make a square move. [debug] Completed ;M98 P"/sys/custom/tool_lock.g" ; Lock the tool [debug] Updated key sensors [debug] Completed ;G53 G0 X580 F6000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. [debug] Completed ;G0 X500 F30000 ; Wipe Backwards, and move away from other tools, incase next move is Y only. (To tool coordinates) [debug] Completed ; Move nozzle to purge area [debug] HTTP: Sent M400 ; Wait for current moves to finish, remaining space 1512, needed 24 [debug] HTTP: Sent M582 T4, remaining space 1480, needed 32 [info] Aborted macro file 0:/macros/TstNest-0.g [debug] Cancelled ; Check so the tool is mounted steady. System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 432 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Cancelled M582 T4 System.Threading.Tasks.TaskCanceledException: A task was canceled. at DuetControlServer.Commands.Code.Process() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 456 at DuetControlServer.Commands.Code.ExecuteInternally() in /home/christian/Duet3D/DuetSoftwareFramework/src/DuetControlServer/Commands/Generic/Code.cs:line 350 [debug] Completed M400 ; Wait for current moves to finish [info] Starting macro file trigger4.g on channel Trigger [debug] Evaluating 3 on channel HTTP [debug] Waiting for execution of M118 S"Carriage coupling failed!" (macro code) [debug] Processing M118 S"Carriage coupling failed!" [debug] Waiting for finish of M118 S"Carriage coupling failed!" [debug] Trigger: Sent M118 S"Carriage coupling failed!", remaining space 1476, needed 60 [debug] Evaluating sensors.gpIn[3].value on channel HTTP [debug] Waiting for finish of echo sensors.gpIn[3].value [debug] Completed echo sensors.gpIn[3].value [debug] Finished codes from macro file 0:/macros/TstNest-0.g [info] Carriage coupling failed! [debug] Completed M118 S"Carriage coupling failed!" [debug] Finished codes from macro file trigger4.g [info] Finished macro file trigger4.g [debug] HTTP: ==> Unfinished starting code: M98 P"0:/macros/TstNest-0.g" [debug] HTTP: Disposing macro file 0:/macros/TstNest-0.g [debug] Completed M98 P"0:/macros/TstNest-0.g" => 1 [debug] Trigger: Disposing macro file trigger4.g [debug] IPC#50: Connection closed [debug] Requesting update of key inputs, seq 41 -> 42 [debug] Updated key inputs
-
@TypQxQ Please revert to the original macros that you shared in your first post and make sure that M122 outputs version 3.2 for both the firmware and DCS. The general order looks OK to me but I cannot see any good reason why the codes after
M98 P"/macros/TstNest-1.g"
are cancelled. -
I have reverted to the files I attached in my post from "31 Dec 2020, 00:24".
I had double checked the version. I couldn't attach debug info because the post exceeded the allowed length.
=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.2 running on Duet 3 MB6HC v0.6 or 1.0 (SBC mode) Board ID: 08DJM-956L2-G43S4-6JKDD-3SJ6L-TB62G Used output buffers: 1 of 40 (15 max) === RTOS === Static ram: 149788 Dynamic ram: 64700 of which 112 recycled Never used RAM 144232, free system stack 154 words Tasks: Linux(ready,71) HEAT(blocked,295) CanReceiv(blocked,801) CanSender(blocked,352) CanClock(blocked,352) TMC(blocked,53) MAIN(running,1120) IDLE(ready,19) Owned mutexes: HTTP(MAIN) === Platform === Last reset 01:36:39 ago, cause: software Last software reset at 2021-01-05 21:57, reason: User, none spinning, available RAM 144336, slot 1 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task Linu Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 MCU temperature: min 39.4, current 39.8, max 40.4 Supply voltage: min 31.9, current 31.9, max 32.0, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0 Driver 0: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Driver 1: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Driver 2: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Driver 3: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Driver 4: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Driver 5: position 0, standstill, reads 13972, writes 0 timeouts 0, SG min/max not available Date/time: 2021-01-05 23:34:00 Slowest loop: 93.48ms; fastest: 0.06ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 3, completed moves 3, 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 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP* is doing "M122" 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 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === CAN === Messages queued 18738, send timeouts 0, received 56197, lost 0, longest wait 1ms for reply type 6036, free buffers 48 === SBC interface === State: 4, failed transfers: 0 Last transfer: 1ms ago RX/TX seq numbers: 59729/59729 SPI underruns 0, overruns 0 Number of disconnects: 2, IAP RAM available 0x2c8a8 Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.2.0 Code buffer space: 4096 Configured SPI speed: 8000000 Hz Full transfers per second: 35.62 Maximum length of RX/TX data transfers: 3364/292
pi@qTC:~ $ sudo /opt/dsf/bin/DuetControlServer -l debug Duet Control Server v3.2.0 Written by Christian Hammacher for Duet3D Licensed under the terms of the GNU Public License Version 3
If you run this code you can run the code above yourself and see.
M950 J3 C"0.io3.in" ; Use the input pin on io3 on the main board as carriage coupling check. M581 P3 T4 S1 ; Use triggers as info.(Run Trigger4.g)