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

DuetLapse available for Alpha testing

Scheduled Pinned Locked Moved
Third-party software
26
239
21.8k
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.
  • undefined
    Danal
    last edited by Danal 27 Apr 2020, 19:26

    Sure,

    http://danalspub.com/wp-content/uploads/2020/04/DuetLapse0427201124.mp4

    Also, note it is at a horrible angle to show a print... the head blocks it. Camera power cord was very short, and I didn't really care about the content of the vid, just did the script work or not.

    Delta / Kossel printer fanatic

    1 Reply Last reply Reply Quote 1
    • undefined
      Phaedrux Moderator
      last edited by 28 Apr 2020, 05:21

      That's great. Can't wait to start using it.

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 0
      • undefined
        Adrian52
        last edited by 29 Apr 2020, 16:52

        Great program, but I still have not got it quite right. I am currently using. /DuetLapse - duet 192.168.1.16 -camera pi -detect pause, with M25 and M400 added to each layer in gcode (easy to do in kisslicer). The problem is that two frames are taken, one when the head is moved away by pause.g, the second a bit later, when the print has resumed. I also get an error message on the console 'm24: cannot print because no file is selected'. It looks as though the m24 is being sent twice.
        I have edited my pause.g so that there is no z shift.

        undefined 1 Reply Last reply 7 May 2020, 04:55 Reply Quote 0
        • undefined
          Danal
          last edited by Danal 29 Apr 2020, 16:53

          I will take a look. Could you post a section of gcode that includes a pause, and the content of your pause.g and resume.g files, please?

          Delta / Kossel printer fanatic

          undefined 1 Reply Last reply 29 Apr 2020, 18:13 Reply Quote 0
          • undefined
            Adrian52 @Danal
            last edited by 29 Apr 2020, 18:13

            @Danal Thanks. This is the gcode transition from layer 1 to 2:

            G1 X7.344 Y7.508 E0.06547
            G1 X6.523 Y8.329 E0.05469
            G1 X6.526 Y8.329 E0.00013
            G1 X7.303 Y8.327 E0.0366
            G1 X7.938 Y7.692 E0.04229
            G1 X8.319 Y7.312 E0.02538
            G1 X8.446 Y7.185 E0.00845
            ; trigger retract
            G10
            ; Blending Fan to Cool (21.9% blend)
            ; Blended Fan at 11%
            ;
            ; 'Destring/Wipe/Jump Path', 0.0 [feed mm/s], 20.0 [head mm/s]
            ; head speed 20.000000, filament speed 0.000000, preload 0.000000
            ; Prepare for End-Of-Layer
            ; time estimate: pre = 66.853355, post = 66.451721
            ; Dwell time remaining = -46.451717
            ;
            ; Post-layer lift
            G1 X8.446 Y7.185 Z0.4 E0 F3000
            ; END_LAYER_OBJECT z=0.200
            ;
            ; *** Every 1 Layers ***
            M25
            M400
            ;
            ; *** Estimate all extruders at 15.9 [s], Slowing 0.776x to 20.0 [s] ***
            ; BEGIN_LAYER_OBJECT z=0.400 z_thickness=0.200
            ; Fan set to Cool value 50%
            ;
            ; 'Loop Path', 1.8 [feed mm/s], 38.8 [head mm/s]
            G1 X9.155 Y-7.346 Z0.4 E0 F7800
            ; trigger prime
            G11
            ; head speed 38.793945, filament speed 1.827376, preload 0.000000
            G1 X9.155 Y-7.153 E0.00908 F2327.6
            G1 X9.155 Y-6.575 E0.02723
            G1 X9.155 Y-5.612 E0.04538
            G1 X9.155 Y-4.263 E0.06354
            G1 X9.155 Y-2.529 E0.08169
            G1 X9.155 Y-0.409 E0.09985
            G1 X9.155 Y4.986 E0.25415
            G1 X9.155 Y9.155 E0.19635
            G1 X-4.417 Y9.155 E0.63929
            G1 X-9.155 Y9.155 E0.22317
            ; Prepare for Perimeter
            G1 X-9.155 Y-9.155 E0.86246

            Pause.g

            M83 ; relative extruder moves
            G1 E-3 F2000 ; retract 3mm
            ;G91 ; relative moves
            ;G1 Z20 F5000 ; raise nozzle 20mm
            G90 ; absolute moves
            G1 X-100 Y20 F10000 ; move head out of the way of the print

            Resume.g

            ;G1 R1 Z2 F5000 ; move to 2mm above resume point
            G1 R1 F10000 ; lower nozzle to resume point
            M83 ; relative extruder moves
            G1 E3 F1500 ; undo the retraction

            As you see I have commented out my z moves

            1 Reply Last reply Reply Quote 0
            • undefined
              Danal
              last edited by Danal 29 Apr 2020, 18:57

              Thanks!

              Also.. If you pulled the script from github after Sat Apr 25 21:27:50 CDT, it no longer looks at Z. It looks at layers. Which works MUCH better.

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • undefined
                Danal
                last edited by 29 Apr 2020, 19:01

                Aha!

                M25 is not for pausing from within a file being printed. Please change these to M226.

                Delta / Kossel printer fanatic

                undefined 1 Reply Last reply 29 Apr 2020, 20:06 Reply Quote 0
                • undefined
                  Adrian52 @Danal
                  last edited by 29 Apr 2020, 20:06

                  @Danal thanks very much - will give it a go.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Adrian52
                    last edited by 29 Apr 2020, 20:54

                    Still getting the same behaviour with M226 in the gcode, with or without z move, using freshly pulled scripts.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Danal
                      last edited by 30 Apr 2020, 00:43

                      Thanks for checking that, I will give this a look.

                      Delta / Kossel printer fanatic

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Adrian52
                        last edited by 2 May 2020, 15:03

                        If you are using the raspberry pi camera, note that it has a default 5 second timeout. If you include -t 1 in the camera parameters, it works much more quickly. I have also started including -ex sports, which uses a fast shutter speed, and -mm matrix, which seems to give a better exposure; -n gives nopreview.
                        With the faster response, I now sometimes get more than one extra picture per layer - I got 547 for a 0.2 layer benchy, instead of 240.

                        undefined 1 Reply Last reply 2 May 2020, 19:59 Reply Quote 0
                        • undefined
                          Danal @Adrian52
                          last edited by 2 May 2020, 19:59

                          @Adrian52 said in DuetLapse available for Alpha testing:

                          If you are using the raspberry pi camera, note that it has a default 5 second timeout. If you include -t 1 in the camera parameters, it works much more quickly. I have also started including -ex sports, which uses a fast shutter speed, and -mm matrix, which seems to give a better exposure; -n gives nopreview.
                          With the faster response, I now sometimes get more than one extra picture per layer - I got 547 for a 0.2 layer benchy, instead of 240.

                          @Adrian52 said in DuetLapse available for Alpha testing:

                          If you are using the raspberry pi camera, note that it has a default 5 second timeout. If you include -t 1 in the camera parameters, it works much more quickly. I have also started including -ex sports, which uses a fast shutter speed, and -mm matrix, which seems to give a better exposure; -n gives nopreview.
                          With the faster response, I now sometimes get more than one extra picture per layer - I got 547 for a 0.2 layer benchy, instead of 240.

                          I will add those to the defaults

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            Adrian52
                            last edited by 6 May 2020, 14:01

                            https://vimeo.com/415279225
                            Is an effort with pla. Used detect - pause, with M226 in the gcode at each layer change. The extra frames have to be deleted before running ffmpeg again

                            1 Reply Last reply Reply Quote 1
                            • undefined
                              arhi
                              last edited by arhi 5 Jun 2020, 16:02 6 May 2020, 15:19

                              some, not so recent, rpi installation ...

                              root@octopi:~/DuetLapse# ./DuetLapse.py -h
                              Traceback (most recent call last):
                                File "./DuetLapse.py", line 21, in <module>
                                  import DuetWebAPI as DWA
                                File "/root/DuetLapse/DuetWebAPI.py", line 27
                                  URL=(f'{self._base_url}'+'/rr_status?type=1')
                                                         ^
                              SyntaxError: invalid syntax
                              root@octopi:~/DuetLapse# python3
                              python3     python3.5   python3.5m  python3m
                              root@octopi:~/DuetLapse# python3 DuetLapse.py -h
                              Traceback (most recent call last):
                                File "DuetLapse.py", line 21, in <module>
                                  import DuetWebAPI as DWA
                                File "/root/DuetLapse/DuetWebAPI.py", line 27
                                  URL=(f'{self._base_url}'+'/rr_status?type=1')
                                                         ^
                              SyntaxError: invalid syntax
                              root@octopi:~/DuetLapse#
                              

                              after rpi-update

                              root@octopi:~/DuetLapse# python3 --version
                              Python 3.5.3
                              root@octopi:~/DuetLapse# python3 ./DuetLapse.py -h
                              Traceback (most recent call last):
                                File "./DuetLapse.py", line 21, in <module>
                                  import DuetWebAPI as DWA
                                File "/root/DuetLapse/DuetWebAPI.py", line 27
                                  URL=(f'{self._base_url}'+'/rr_status?type=1')
                                                         ^
                              SyntaxError: invalid syntax
                              root@octopi:~/DuetLapse# python3 ./DuetLapse.py
                              Traceback (most recent call last):
                                File "./DuetLapse.py", line 21, in <module>
                                  import DuetWebAPI as DWA
                                File "/root/DuetLapse/DuetWebAPI.py", line 27
                                  URL=(f'{self._base_url}'+'/rr_status?type=1')
                                                         ^
                              SyntaxError: invalid syntax
                              root@octopi:~/DuetLapse#
                              
                              1 Reply Last reply Reply Quote 0
                              • undefined
                                arhi
                                last edited by arhi 5 Jun 2020, 16:23 6 May 2020, 16:17

                                hm and just in case wget messed something up .. git clone of both repos

                                root@octopi:~/DuetLapse/DuetLapse# PYTHONPATH=/root/DuetLapse/DuetWebAPI python3 DuetLapse.py -h
                                Traceback (most recent call last):
                                File "DuetLapse.py", line 21, in <module>
                                import DuetWebAPI as DWA
                                File "/root/DuetLapse/DuetWebAPI/DuetWebAPI.py", line 27
                                URL=(f'{self._base_url}'+'/rr_status?type=1')
                                ^
                                SyntaxError: invalid syntax
                                root@octopi:~/DuetLapse/DuetLapse#

                                I don't get it, I don't see that this line changed since forever?!

                                looks like F-Strings are in from 3.6 only raspbian on pi3b+ latest comes with 3.5.3 😞

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  Danal
                                  last edited by 6 May 2020, 20:58

                                  @arhi said in DuetLapse available for Alpha testing:

                                  URL=(f'{self._base_url}'+'/rr_status?type=1')

                                  @arhi Very interesting, I don't get that, and that line is not a syntax error. Hmmm... Let me think of a way to pin this down.

                                  Delta / Kossel printer fanatic

                                  undefined 1 Reply Last reply 6 May 2020, 22:04 Reply Quote 0
                                  • undefined
                                    arhi @Danal
                                    last edited by 6 May 2020, 22:04

                                    @Danal said in DuetLapse available for Alpha testing:

                                    @arhi said in DuetLapse available for Alpha testing:

                                    URL=(f'{self._base_url}'+'/rr_status?type=1')

                                    @arhi Very interesting, I don't get that, and that line is not a syntax error. Hmmm... Let me think of a way to pin this down.

                                    F-strings are 3.6 python from what I read online, and stretch has max python 3.5.3 ... I'm now going to move to buster and see if it uses newer python

                                    undefined 1 Reply Last reply 6 May 2020, 22:15 Reply Quote 0
                                    • undefined
                                      Danal @arhi
                                      last edited by 6 May 2020, 22:15

                                      @arhi said in DuetLapse available for Alpha testing:

                                      @Danal said in DuetLapse available for Alpha testing:

                                      @arhi said in DuetLapse available for Alpha testing:

                                      URL=(f'{self._base_url}'+'/rr_status?type=1')

                                      @arhi Very interesting, I don't get that, and that line is not a syntax error. Hmmm... Let me think of a way to pin this down.

                                      F-strings are 3.6 python from what I read online, and stretch has max python 3.5.3 ... I'm now going to move to buster and see if it uses newer python

                                      Excellent detective work. I had no idea f was that recent.

                                      Delta / Kossel printer fanatic

                                      undefined 1 Reply Last reply 6 May 2020, 22:57 Reply Quote 0
                                      • undefined
                                        arhi @Danal
                                        last edited by 6 May 2020, 22:57

                                        @Danal I don't use python at all so I don't have anything but what's normally there with the distro... so, troubles with buster too it comes with newer python but again

                                        root@octopi:~/DuetLapse/DuetLapse# apt-get install python3-numpy python-numpy
                                        Reading package lists... Done
                                        Building dependency tree
                                        Reading state information... Done
                                        python-numpy is already the newest version (1:1.16.2-1).
                                        python3-numpy is already the newest version (1:1.16.2-1).
                                        root@octopi:~/DuetLapse/DuetLapse# python3 DuetLapse.py -h
                                        Python Library Module 'numpy' is required.
                                        Obtain via 'sudo python3 -m pip install numpy'
                                        root@octopi:~/DuetLapse/DuetLapse# python3 DuetLapse.py
                                        Python Library Module 'numpy' is required.
                                        Obtain via 'sudo python3 -m pip install numpy'
                                        root@octopi:~/DuetLapse/DuetLapse# python3 DuetLapse.py -h
                                        Python Library Module 'numpy' is required.
                                        Obtain via 'sudo python3 -m pip install numpy'
                                        root@octopi:~/DuetLapse/DuetLapse# python3 -m pip install numpy
                                        Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
                                        Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (1.18.4)
                                        root@octopi:~/DuetLapse/DuetLapse# pip3 install numpy
                                        Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
                                        Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (1.18.4)
                                        root@octopi:~/DuetLapse/DuetLapse# python3 DuetLapse.py -h
                                        Python Library Module 'numpy' is required.
                                        Obtain via 'sudo python3 -m pip install numpy'
                                        root@octopi:~/DuetLapse/DuetLapse# python3 --version
                                        Python 3.7.3
                                        root@octopi:~/DuetLapse/DuetLapse#
                                        
                                        root@octopi:~# python3
                                        Python 3.7.3 (default, Dec 20 2019, 18:57:59)
                                        [GCC 8.3.0] on linux
                                        Type "help", "copyright", "credits" or "license" for more information.
                                        >>> import subprocess
                                        >>> import sys
                                        >>> import argparse
                                        >>> import time
                                        >>> import numpy as np
                                        Traceback (most recent call last):
                                          File "/usr/local/lib/python3.7/dist-packages/numpy/core/__init__.py", line 24, in <module>
                                            from . import multiarray
                                          File "/usr/local/lib/python3.7/dist-packages/numpy/core/multiarray.py", line 14, in <module>
                                            from . import overrides
                                          File "/usr/local/lib/python3.7/dist-packages/numpy/core/overrides.py", line 7, in <module>
                                            from numpy.core._multiarray_umath import (
                                        ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory
                                        
                                        During handling of the above exception, another exception occurred:
                                        
                                        Traceback (most recent call last):
                                          File "<stdin>", line 1, in <module>
                                          File "/usr/local/lib/python3.7/dist-packages/numpy/__init__.py", line 142, in <module>
                                            from . import core
                                          File "/usr/local/lib/python3.7/dist-packages/numpy/core/__init__.py", line 50, in <module>
                                            raise ImportError(msg)
                                        ImportError:
                                        
                                        IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
                                        
                                        Importing the numpy C-extensions failed. This error can happen for
                                        many reasons, often due to issues with your setup or how NumPy was
                                        installed.
                                        
                                        We have compiled some common reasons and troubleshooting tips at:
                                        
                                            https://numpy.org/devdocs/user/troubleshooting-importerror.html
                                        
                                        Please note and check the following:
                                        
                                          * The Python version is: Python3.7 from "/usr/bin/python3"
                                          * The NumPy version is: "1.18.4"
                                        
                                        and make sure that they are the versions you expect.
                                        Please carefully study the documentation linked above for further help.
                                        
                                        Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
                                        
                                        >>>
                                        

                                        I love how consistent APT system is 😞

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          arhi
                                          last edited by 6 May 2020, 22:58

                                          apt-get install libatlas-base-dev

                                          solved the numpy error

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