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

    M30 --ignore-file-not-found

    Scheduled Pinned Locked Moved
    Firmware wishlist
    2
    7
    279
    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.
    • arhiundefined
      arhi
      last edited by arhi

      Not important feature, but nice to have.
      Way to tell M30 to ignore and not report error if file is not found.

      Why?
      I do something like:

      curl.exe -G --data-urlencode "gcode=M30\"%filename%%extension%\"" http://ender5.local.lan/rr_gcode
      curl.exe  --data-binary "@%if%" "http://ender5.local.lan/rr_upload?name=gcodes/%filename%%extension%"
      

      so delete a file, upload a file, and if a file is now (do not exist on the duet) M30 returns the error that lingers forever on the web till I manually close it. Not a big issue but a nuisance 🙂

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

        Unfortunately the M30 command was specified (before I got involved with 3D printing) as taking a filename argument with no parameter letter to introduce it. So there is no possibility of adding a parameter to it to specify whether or not it is an error if the file doesn't exist. We would need to introduce another M-code, possibly M30.1.

        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

        1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi
          last edited by

          yeah weird that it's not M30 P"filename" 🙂
          M31.1 would work too 🙂

          1 Reply Last reply Reply Quote 0
          • arhiundefined
            arhi
            last edited by

            @dc42 one other thing .. I don't see why is M30 "nonexistingfile" ERROR and not WARNING ? The syntax is ok, the "file not found" should IMO be warning and not error.

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

              Good point. I'll change it to Warning in release 3.2.

              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

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

                btw as you are using curl to send the command, instead of sending a M30 command you could instead send:

                rr_delete?name=/gcodes/myfile.gcode

                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

                arhiundefined 1 Reply Last reply Reply Quote 1
                • arhiundefined
                  arhi @dc42
                  last edited by

                  @dc42 good point, still looking at those hooks ..

                  changed S3D postprocessing script to

                  @echo off
                  
                  for %%a in (%1) do (
                      set filepath=%%~dpa
                      set filename=%%~na
                      set extension=%%~xa
                  )   
                  set if=%filepath%%filename%%extension%
                  
                  G:\bin\curl-7.50.3-win64-mingw\bin\curl.exe                        "http://ender5.local.lan/rr_delete?name=gcodes/%filename%%extension%"
                  G:\bin\curl-7.50.3-win64-mingw\bin\curl.exe  --data-binary "@%if%" "http://ender5.local.lan/rr_upload?name=gcodes/%filename%%extension%"
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA