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

    3.5 beta 2 copy paste in Macro

    Scheduled Pinned Locked Moved Solved
    Beta Firmware
    4
    8
    209
    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.
    • Proschi3Dundefined
      Proschi3D
      last edited by

      I noticed that when I create a macro and copy and paste something, the macro doesn't work.
      But if I edit it on the pc and upload it, the same macro works.

      Love my Duet 3 Mini.
      https://www.instagram.com/proschi3d
      https://youtube.com/@proschi3d
      https://www.proschi3d.de

      Proschi3Dundefined chrishammundefined 2 Replies Last reply Reply Quote 0
      • Proschi3Dundefined
        Proschi3D @Proschi3D
        last edited by

        here's an example
        I created a macro in the dwc and pasted the code with copy paste.
        the macro didn't work and there were many bad comand errors

        ; tune heater 1 and wait for it to finish
        M303 H1 S210
        while heat.heaters[1].state != "standby" && heat.heaters[1].state != "off"
          G4 S1
        
        ; tune heater 2 and wait for it to finish
        M303 H2 S210
        while heat.heaters[2].state != "standby" && heat.heaters[2].state != "off"
          G4 S1
        
        ; tuning finished, save parameters to config-override.g
        M500
        

        I then created an empty editor file in windows, inserted the code with copy paste and uploaded it to the DWC.
        then the same code works

        Love my Duet 3 Mini.
        https://www.instagram.com/proschi3d
        https://youtube.com/@proschi3d
        https://www.proschi3d.de

        OwenDundefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
        • chrishammundefined
          chrishamm administrators @Proschi3D
          last edited by

          @Proschi78 Can you explain what does not work?

          Duet software engineer

          Proschi3Dundefined 1 Reply Last reply Reply Quote 0
          • Proschi3Dundefined
            Proschi3D @chrishamm
            last edited by

            @chrishamm I added an example above

            Love my Duet 3 Mini.
            https://www.instagram.com/proschi3d
            https://youtube.com/@proschi3d
            https://www.proschi3d.de

            1 Reply Last reply Reply Quote 0
            • OwenDundefined
              OwenD @Proschi3D
              last edited by

              @Proschi78
              Your example doesn't really help replicate the problem.
              You will need to create a file using copy/paste that errors.
              Run the file and post the errors.
              Then create the same file in window.
              Then upload them both as attachments.
              Don't post the code using the </> button.
              That way we can see tabs , line endings etc exactly as they are being executed.

              1 Reply Last reply Reply Quote 3
              • T3P3Tonyundefined
                T3P3Tony administrators @Proschi3D
                last edited by

                @Proschi78 I think this is an issue with file line endings. See this thread:

                https://forum.duet3d.com/post/307796

                Please try the new binary that dc42 posted there.

                It appears that the new text editor in DWC 3.5 defaults to CRLF but if the file already uses LF, it sticks with that. That's why you see a difference depending on if it's an existing or new macro.

                www.duet3d.com

                Proschi3Dundefined 1 Reply Last reply Reply Quote 1
                • Proschi3Dundefined
                  Proschi3D @T3P3Tony
                  last edited by

                  @T3P3Tony Thanks that fixed the problem.

                  I was already doubting myself

                  Love my Duet 3 Mini.
                  https://www.instagram.com/proschi3d
                  https://youtube.com/@proschi3d
                  https://www.proschi3d.de

                  T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                  • T3P3Tonyundefined
                    T3P3Tony administrators @Proschi3D
                    last edited by

                    @Proschi78 thanks for confirming that fix worked.

                    www.duet3d.com

                    1 Reply Last reply Reply Quote 0
                    • T3P3Tonyundefined T3P3Tony marked this topic as a question
                    • T3P3Tonyundefined T3P3Tony has marked this topic as solved
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA