Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    [3.5.1] Macro restarting

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    3
    5
    411
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tristanryerparkeundefined
      tristanryerparke
      last edited by tristanryerparke

      I've been doing a bunch of experimentation on an SBC driven system with, sd jobs, macros, pause, resume, M400, and dsf-python.

      I've encountered some issues and general unreliable results when triggering commands and macros from various code channels, especially when interacting with pause/resume during a file. So I preceded to try and create some minimal examples that showcase my issues. When trying to create a control example (without all the channel stuff) I came across this issue with macros.

      Steps to replicate:

      • Fresh 64 bit duetpi install on RPI4, sudo apt-get update,sudo apt-get upgrade (everything is at 3.5.1)
      • Upload of my config.g
      • Change LogLevel to debug in /opt/dsf/conf/config.json
      • Reboot
      • Home
      • Upload of a gcode file test_custom_code_in_file.nc.g (added .g) for upload
      • Upload of a macro move_x_macro.g
      • Running of test_custom_code_in_file.nc produces expected effect, machine moves down in the Y axis, enters macro, moves over on X axis, finishes macro, and then continues to move down in Y. sudo journalctl --unit duetcontrolserver -f gives the following output during: normal_file_w_macro_nopause.log.g
      • While running test_custom_code_in_file.nc, the user hits pause in dwc while the x axis is moving. The macro completes and the x axis moves out to a value of 400.
      • User presses resume, and the macro is re-executed the X axis goes back to around 0, and repeats the motion out to 400. normal_file_w_macro_pause.log.g

      As far as I know, unless the macro has an M98 R1 (which mine does not have) , the file should resume directly after the M98 call. I tried adding an M98 R0 command to the beginning, but got the same result.

      For macros that toggle physical systems, i.e tool-change-like actions, a repeat like this can cause a crash.

      My eventual goal here is to figure out how to pause a file without the fear of a macro being repeated.

      Then I can move on to to diagnosing my other issues.
      Thanks
      T

      Edit:
      I tried going back to 3.4.6, and things functioned in the way I would expect. The macro did not restart after resuming.

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @tristanryerparke
        last edited by

        @tristanryerparke This sounds somewhat similar to the issue reported here: https://forum.duet3d.com/topic/35544/resume-g-activating-twice-with-fw3-5
        It's on the list for @dc42 to have a look at. I'll alert him to this thread.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        tristanryerparkeundefined 1 Reply Last reply Reply Quote 0
        • tristanryerparkeundefined
          tristanryerparke @droftarts
          last edited by tristanryerparke

          @droftarts Thanks.
          Is it possible to go back to 3.5.0-beta4 to temporarily avoid the issue while still having some of the 3.5 features?
          I couldn't find it on the rrf/dsf apt package index.

          Edit:
          I built and installed rrf/dsf/dwc 3.5.0-beta4 but the issue persisted, so I had to stay at 3.4.6 to avoid the macros restarting.

          dc42undefined 1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @tristanryerparke
            last edited by

            @tristanryerparke if you haven't already, please upgrade to 3.5.2 and report whether it fixes this issue.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            tristanryerparkeundefined 1 Reply Last reply Reply Quote 0
            • tristanryerparkeundefined
              tristanryerparke @dc42
              last edited by tristanryerparke

              @dc42 On 3.5.2 I'm noticing some different behavior.
              This time when the user presses pause while the move_x_macro.g is running, the x axis stops at X=300 and the machine enters a paused state. The macro does not seem to restart upon resuming.
              The final line of the macro is G0 X400 which indicates the last movement command is being skipped? I tried adding a G0 X0 to the end of the macro and repeating with the pause, which made the machine stop at X=400. Repeating the G0 X0 did not help either.

              EDIT:
              I tried adding M400 or G4 P1 at the end of the file as workarounds for the last command issue, but this made the restart issue re-emerge.
              Can provide logs again if need be.

              Thanks,
              T

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA