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

    random Duet3 + SBC questions...

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    16
    1.2k
    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.
    • garyd9undefined
      garyd9
      last edited by

      (With no duet3 specific category, I'm really not sure where to put this post. Please move it if there's a category that works better than 'tuning and tweaking')

      Some random questions I haven't been able to find answers to while searching:

      When using a Duet3 with SBC, which board/processor is used for simulating gcode prints?

      I currently use a script from @resam for webcam timelapse videos. That script relies on being able to open a telnet port to the duet to see layer change notifications (via "M118 P4 S"..." gcodes inserted by the slicer.) This won't work with the Duet3/SBC combination due to the lack of telnet support. As an alternative, is there any hook in DSF to watch for gcodes, M118 messages, etc? (Is there any documentation available for hooking into DSF?)

      Is the "DuetPi" sdcard image based on raspbian "buster"? Other than the addition of the DSF (and server) being pre-installed (and with related repos added), how else is the image different?

      Is there a maximum suggested length for the ribbon cable between the Duet3 and SBC?

      Thank you
      Gary

      "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

      dc42undefined A Former User? 2 Replies Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @garyd9
        last edited by

        @garyd9 said in random Duet3 + SBC questions...:

        (With no duet3 specific category, I'm really not sure where to put this post. Please move it if there's a category that works better than 'tuning and tweaking')

        Some random questions I haven't been able to find answers to while searching:

        When using a Duet3 with SBC, which board/processor is used for simulating gcode prints?

        The Duet.

        I currently use a script from @resam for webcam timelapse videos. That script relies on being able to open a telnet port to the duet to see layer change notifications (via "M118 P4 S"..." gcodes inserted by the slicer.) This won't work with the Duet3/SBC combination due to the lack of telnet support. As an alternative, is there any hook in DSF to watch for gcodes, M118 messages, etc? (Is there any documentation available for hooking into DSF?)

        Yes, there is. I'll leave others to provide the details.

        Is the "DuetPi" sdcard image based on raspbian "buster"? Other than the addition of the DSF (and server) being pre-installed (and with related repos added), how else is the image different?

        Apart from DSF and the server being pre-installed, the buffer size of the SPI interface is changed. There may be other changes too. @chrishamm can give you the details.

        Is there a maximum suggested length for the ribbon cable between the Duet3 and SBC?

        I suggest 200mm maximum to permit the use of high SPI speeds.

        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
        • Danalundefined
          Danal
          last edited by

          @garyd9 said in random Duet3 + SBC questions...:

          I currently use a script from @resam for webcam timelapse videos. That script relies on being able to open a telnet port to the duet to see layer change notifications (via "M118 P4 S"..." gcodes inserted by the slicer.) This won't work with the Duet3/SBC combination due to the lack of telnet support. As an alternative, is there any hook in DSF to watch for gcodes, M118 messages, etc? (Is there any documentation available for hooking into DSF?)

          There are a handful of different ways to hook. It might be possible to setup something that makes the script work as is (not telnet per say, but the same payloads on the same TCP ports); however, there is likely to be a much better way, if we take a look at the script.

          May I please request a link, or post a copy here, of that script?

          Delta / Kossel printer fanatic

          garyd9undefined 1 Reply Last reply Reply Quote 0
          • A Former User?
            A Former User @garyd9
            last edited by

            @garyd9 said in random Duet3 + SBC questions...:

            I currently use a script from @resam for webcam timelapse videos. That script relies on being able to open a telnet port to the duet to see layer change notifications (via "M118 P4 S"..." gcodes inserted by the slicer.) This won't work with the Duet3/SBC combination due to the lack of telnet support. As an alternative, is there any hook in DSF to watch for gcodes, M118 messages, etc? (Is there any documentation available for hooking into DSF?)

            lots of ways the simplest may be one of the ones offered here https://forum.duet3d.com/topic/13566/socat-the-guide-to-remote-serial-paneldue-and-telnet-ish
            but mind you i found the reliability of socat + codeconsole to be lacking, pending further investigation

            i suspect Danal will come up with a more involved, but cleaner and more reliable option

            1 Reply Last reply Reply Quote 0
            • garyd9undefined
              garyd9 @Danal
              last edited by

              @Danal

              The original thread is here: https://forum.duet3d.com/topic/6058/timelapse-pictures-videos-with-duet-and-webcam-on-layer-change

              The gcode inserted by the slicer is: M118 P4 S"LAYER CHANGE"

              Here's a link to the python script hosted on github by the author: https://github.com/Kriechi/DuetRRF-timelapse/blob/master/timelapse.py

              It basically just opens a telnet port to the duet and waits for the string "LAYER CHANGE". On seeing that, it saves a snapshot from the PiCam.

              I could easily reproduce this in another language (including C#/.Net.) What I'd like to avoid, however, is having to parse EVERY gcode command in a .g file while it's being sent to the Duet3. (The impression I got from reading the DSF docs is that I can't filter that stream...)

              "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

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

                @garyd9 said in random Duet3 + SBC questions...:

                I could easily reproduce this in another language (including C#/.Net.) What I'd like to avoid, however, is having to parse EVERY gcode command in a .g file while it's being sent to the Duet3. (The impression I got from reading the DSF docs is that I can't filter that stream...)

                The command has already been parsed for you when you intercept it. All you need to do is check whether the command letter and command number are a combination that interests you. If not, just pass it on.

                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
                • Danalundefined
                  Danal
                  last edited by

                  I believe there is an easier way. Take the script that currently connects to telnet, strip all the telnet socket stuff out, and make it read stdin. Then, run it on the SBC with: sudo journalctl -fu duetcontrolserver | timelapse.py (which could itself be a one line shell script)

                  There is one other small change required: The M118 P4 that currently get embedded need to be M118 P0 to hit the log that the above command is scanning.

                  Does that make sense? And/or do you need me to make that version of the scripts?

                  Delta / Kossel printer fanatic

                  garyd9undefined A Former User? Wallyundefined 3 Replies Last reply Reply Quote 0
                  • garyd9undefined
                    garyd9 @Danal
                    last edited by

                    @Danal said in random Duet3 + SBC questions...:

                    I believe there is an easier way. Take the script that currently connects to telnet, strip all the telnet socket stuff out, and make it read stdin. Then, run it on the SBC with: sudo journalctl -fu duetcontrolserver | timelapse.py (which could itself be a one line shell script)

                    There is one other small change required: The M118 P4 that currently get embedded need to be M118 P0 to hit the log that the above command is scanning.

                    Does that make sense? And/or do you need me to make that version of the scripts?

                    It does make sense. I'm wondering what the "M118 P0" will do in DWC, though...

                    "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

                    A Former User? 1 Reply Last reply Reply Quote 0
                    • A Former User?
                      A Former User @Danal
                      last edited by

                      @Danal said in random Duet3 + SBC questions...:

                      The M118 P4 that currently get embedded need to be M118 P0 to hit the log that the above command is scanning.

                      does this have a version requirement? haven't updated in a while, but M118 did not show up in journalctl regardless of P

                      Danalundefined 1 Reply Last reply Reply Quote 0
                      • A Former User?
                        A Former User @garyd9
                        last edited by

                        @garyd9 said in random Duet3 + SBC questions...:

                        I'm wondering what the "M118 P0" will do in DWC, though...

                        seems to vary. if executed in dwc console it shows in dwc, if executed elsewhere it does not. (at least on the version i tried)

                        1 Reply Last reply Reply Quote 0
                        • Danalundefined
                          Danal
                          last edited by Danal

                          Within a running job, it logs to the correct log on the SBC for the commands I was proposing.

                          It also logs to DWC, log and popup.

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 0
                          • Danalundefined
                            Danal @A Former User
                            last edited by

                            @bearer said in random Duet3 + SBC questions...:

                            @Danal said in random Duet3 + SBC questions...:

                            The M118 P4 that currently get embedded need to be M118 P0 to hit the log that the above command is scanning.

                            does this have a version requirement? haven't updated in a while, but M118 did not show up in journalctl regardless of P

                            Maybe. I am on:

                            DSF Version: 1.2.3.1

                            Delta / Kossel printer fanatic

                            1 Reply Last reply Reply Quote 0
                            • Wallyundefined
                              Wally @Danal
                              last edited by

                              @Danal
                              Not being super python savvy, I think it would be very handy if you could provide the modified version of timelapse.py and a bit of instructions on how to setup for others with a Duet3 + SBC. I would be willing to help test/verify/report on my setup. If it helps, I already have MJPG-streamer and FFMPEG setup and running on my SBC (Pi 3).

                              Danalundefined 1 Reply Last reply Reply Quote 0
                              • Danalundefined
                                Danal
                                last edited by

                                I will take a look!

                                Delta / Kossel printer fanatic

                                1 Reply Last reply Reply Quote 0
                                • Wallyundefined
                                  Wally
                                  last edited by

                                  Just to help complete anyone that come back through this thread:
                                  Danal has a Time Lapse Python script posted here for the Duet 3: https://github.com/DanalEstes/DuetLapse
                                  Also, I have one published for the Duet 3 here: https://github.com/JimsJump/Duet_3_6HC_Time_Lapse
                                  Danal's is more polished for multiple systems where my is more customized to my setup.

                                  1 Reply Last reply Reply Quote 0
                                  • Danalundefined
                                    Danal @Wally
                                    last edited by Danal

                                    @Wally said in random Duet3 + SBC questions...:

                                    @Danal
                                    Not being super python savvy, I think it would be very handy if you could provide the modified version of timelapse.py and a bit of instructions on how to setup for others with a Duet3 + SBC. I would be willing to help test/verify/report on my setup. If it helps, I already have MJPG-streamer and FFMPEG setup and running on my SBC (Pi 3).

                                    I may have misread this when I replied back on the 18th.

                                    DuetLapse can run on any Pi. Personally, I wouldn't run it on a Pi zero, but it will probably work (very slowly). The Pi on which DuetLapse runs only needs to be able to reach the printer that it is going to monitor or control via the network, and the camera it is told to use. If a command or library is missing, it will tell you how to get it.

                                    To say this same thing phrased another way:

                                    • DuetLapse can be run on the Pi in a Duet 6HC + Pi configuration. With no modifications.

                                    • DuetLapse does not require running on a Duet 6HC + Pi. It runs on any Pi that has network connectivity to the printer.

                                    Therefore, the instructions are:

                                    • Install per https://github.com/DanalEstes/DuetLapse#installation
                                    • Perhaps take a look at ./DuetLapse.py -h.
                                    • Run.
                                    • Enjoy.

                                    Delta / Kossel printer fanatic

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