Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Indication of print in progress

    General Discussion
    4
    26
    680
    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.
    • rubillos
      rubillos last edited by

      Is there any way to set one of the digital outputs on the Duet to be high when a print is underway and low otherwise?

      I want to hook up a Raspberry Pi as a time-lapse camera and need some way to start and stop the captures.

      1 Reply Last reply Reply Quote 0
      • DocTrucker
        DocTrucker last edited by

        You could have your slicer add start and end gcode that runs a macro that controls an output. You could also get the slicer to trigger the camera for each layer like this.

        Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

        1 Reply Last reply Reply Quote 0
        • DocTrucker
          DocTrucker last edited by

          ...you could even move the head out of the way of the print for each photo but this will have a direct effect on build time.

          Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

          1 Reply Last reply Reply Quote 0
          • rubillos
            rubillos last edited by

            I'm looking for something that's independent of the slicer, something that will let the capture stop if the print is aborted.

            (I've used slicer based commands with OctoPrint and OctoLapse, in this case I really want something that's triggered directly by the state of the printer).

            1 Reply Last reply Reply Quote 0
            • DocTrucker
              DocTrucker last edited by

              I'd consider using the ps_on signl then. Either directly if your not making use the safety features to kill the heaters in a fault, or take a feed from that as an enable. I think there are start and stop macros on the duet? Trigger the ps_on from there, and it can also be dropped on a fault.

              Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

              1 Reply Last reply Reply Quote 0
              • DocTrucker
                DocTrucker last edited by DocTrucker

                Yeah, so perhaps call a start.g from your gcode and then drop or raise the signal in the pause/cancel/resume g code scrips:

                https://duet3d.dozuki.com/Wiki/Macros#Section_Pause_stop_and_power_fail

                It doesn't have to be the ps_on signal, I'd recommend keeping that for killing the VIN power supply. Perhaps just trigger a fan output between 0 and 100% duty.

                Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                1 Reply Last reply Reply Quote 0
                • rubillos
                  rubillos last edited by

                  Are there start and stop macros? I didn't see them in the docs... if there are then that would solve my problem.

                  1 Reply Last reply Reply Quote 0
                  • DocTrucker
                    DocTrucker last edited by DocTrucker

                    I think you need to call the start macro but look at the link for pause cancel and resume. Edit: + stop and sleep.

                    Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                    1 Reply Last reply Reply Quote 0
                    • rubillos
                      rubillos last edited by

                      I guess I could do start and stop in the slicer gcode, but also have the codes in pause/cancel/resume.

                      Was hoping there was a start macro... there's always poking around in the source code and doing a custom build 🙂

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

                        Another way would be to configure the RPi as an HTTP client and have it make rr_status requests to the Duet. The response includes whether or not a file is being printed.

                        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

                        rubillos 1 Reply Last reply Reply Quote 0
                        • DocTrucker
                          DocTrucker last edited by

                          The automatic call of an optional start.g gcode does seem like an ommision. @dc42 is there anything on the horizon?

                          Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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

                            @dc42 has having start.g and end.g files ever been considered? Is there any reason not to have those?

                            DocTrucker 1 Reply Last reply Reply Quote 0
                            • DocTrucker
                              DocTrucker @rubillos last edited by

                              @rubillos end.g = stop.g

                              Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                              1 Reply Last reply Reply Quote 0
                              • rubillos
                                rubillos last edited by

                                And that is also called when a print is canceled?

                                DocTrucker dc42 2 Replies Last reply Reply Quote 0
                                • DocTrucker
                                  DocTrucker last edited by

                                  The http method @dc42 recommends has a few benefits.

                                  • No extra wiring or failure points.
                                  • If in the (unlikely) event of a process hang the http will stop responding and you can cancel your capture.

                                  Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                                  rubillos 1 Reply Last reply Reply Quote 0
                                  • DocTrucker
                                    DocTrucker @rubillos last edited by

                                    @rubillos https://duet3d.dozuki.com/Wiki/Macros#Section_Pause_stop_and_power_fail

                                    Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

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

                                      @doctrucker said in Indication of print in progress:

                                      The automatic call of an optional start.g gcode does seem like an ommision. @dc42 is there anything on the horizon?

                                      I implemented this many releases ago.

                                      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

                                      DocTrucker rubillos 2 Replies Last reply Reply Quote 0
                                      • dc42
                                        dc42 administrators @rubillos last edited by

                                        @rubillos said in Indication of print in progress:

                                        And that is also called when a print is canceled?

                                        No, cancel.g is called instead.

                                        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
                                        • DocTrucker
                                          DocTrucker @dc42 last edited by

                                          @dc42 documentation hasn't caught up yet.

                                          Alive: 1 Ormerodish machines. 1 Custom Cantilever. 3 P3Steel. 1 Ciclopish scanner. In build: 1 P3Steel. Controllers: 2 Duet 2 , 2 D0.6, 1 D0.8.5, 1 D3 v0.5, 1 RAMPS/DRV8825, 1 Uno/Scan Card.

                                          1 Reply Last reply Reply Quote 0
                                          • rubillos
                                            rubillos @DocTrucker last edited by

                                            @doctrucker True. That might be the way to go... I'll have a look at modifying my time-lapse code.

                                            There are just so many I/O pins on the Duex5, seemed like an easy thing to hook up 🙂

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

                                              @dc42 So start.g is called when a print starts?

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

                                                @rubillos said in Indication of print in progress:

                                                @dc42 So start.g is called when a print starts?

                                                Yes, whenever a print from SD card starts. I have updated the documentation at https://duet3d.dozuki.com/Wiki/Macros.

                                                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

                                                rubillos 1 Reply Last reply Reply Quote 1
                                                • rubillos
                                                  rubillos @dc42 last edited by

                                                  @dc42 Awesome! Thank you!

                                                  1 Reply Last reply Reply Quote 0
                                                  • Phaedrux
                                                    Phaedrux Moderator last edited by

                                                    @resam has a raspberry pi camera solution as well, though I can't seem to find the thread at the moment.

                                                    Z-Bot CoreXY Build | Thingiverse Profile

                                                    1 Reply Last reply Reply Quote 0
                                                    • Phaedrux
                                                      Phaedrux Moderator last edited by

                                                      Here it is: https://forum.duet3d.com/topic/6058/timelapse-pictures-videos-with-duet-and-webcam-on-layer-change

                                                      Z-Bot CoreXY Build | Thingiverse Profile

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