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

    Macro file reading via Serialport

    Scheduled Pinned Locked Moved Solved
    General Discussion
    4
    8
    387
    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.
    • Sivaundefined
      Siva
      last edited by

      Hi,

      How can I edit what is written in macro files using serial terminal?

      Eg:-
      "doorlock.g" is the macro file
      We want to read and edit that file via serial terminal since it's in a remote
      location.

      Is it possible to do with any of the built in commands?

      Regards
      Siva

      jay_s_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @Siva
        last edited by

        @Siva not that i'm aware of

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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

          @Siva the only way I can think of doing it is by using a nasty hack that would leave the Duet unbootable if the serial link is lost at the wrong moment.

          To edit the file you would need to download the file to your remote PC, edit it, and then upload it again. There is a facility to upload files over serial, so that isn't a problem. However, there isn't currently a facility to download files over serial; except that the M503 command will download config.g. So you could do the following:

          • Rename /sys/config.g to configsave.g using the M471 command;
          • Rename the file you want to edit to /sys/config.g
          • Use M503 to download it
          • Rename config.g back to its original filename
          • Rename configsave.g back to config.g
          • Edit the file on the PC
          • Upload it using M559, M560 or M28

          Alternatively, if you keep up-to-date copies of the files that you might want to edit on the remote PC, you could just edit the local copy and then upload it.

          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

          Sivaundefined 1 Reply Last reply Reply Quote 0
          • Sivaundefined
            Siva @dc42
            last edited by

            @dc42 Thanks for those steps.

            We are using "Duet3 6HC" in our products. Is it possible to build a binary file with sys folder included so that we don't need to use SDcard anymore?

            Thanks
            Siva

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

              @Siva yes it's possible to do that, although we haven't tested that configuration on a board that supports networking, so there might be some more work to do to get the FTP and HTTP servers working.

              Can you tell me a little more about your application and why you want to run without a SD card? Where would you keep the files containing the jobs to be run?

              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

              Sivaundefined 1 Reply Last reply Reply Quote 0
              • Sivaundefined
                Siva @dc42
                last edited by

                @dc42 We don't want our customers to access "config and macros files" on the SD Card.
                Duet is connected to another hardware via serial port which receives latest firmware updates from the remote server.

                When we add more feature to our products, we have to update all our devices including Duet. In case of duet this includes updating Config/macro files on the SDCard.

                When the customer click update on the UI(user interface) this should update all the hardware with latest Firmware's.

                Currently we can update the Duet Firmware via "bossa" integrated into our application. This doesn't contain "sys" folder which includes macros and config files.

                In Eclipse when we build it outputs ".bin" in this folder 16c3d95b-01db-4de2-8fc2-b4723fd48bed-image.png

                If we can somehow integrate "sys" folder during build, so that we don't have to use SDCard.

                I am not sure how easy to do this but this is one of the feature we need before we actually release our product.

                Thanks
                Siva

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

                  @Siva we can look at doing a build configuration that embeds the system files in the binary, but I'd like to make sure that you are aware of the consequences of not having a writable SD card, which include (but are not limited to)

                  • No resume-after-power-fail support
                  • No support for accelerometers
                  • No support for tuning closed loop motors
                  • No logging of events that you might wish to record
                  • Pausing a job will take some time, because when you send data over a serial link there is no provision to cancel pending moves in the motion queue (other than emergency stop)

                  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

                  Sivaundefined 1 Reply Last reply Reply Quote 0
                  • Sivaundefined
                    Siva @dc42
                    last edited by

                    @dc42 Thanks this is now resolved by David.

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