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

    M671 like function for Delta printer

    Scheduled Pinned Locked Moved
    Gcode meta commands
    7
    45
    1.4k
    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.
    • dc42undefined
      dc42 administrators @tecno
      last edited by dc42

      @tecno said in M671 like function for Delta printer:

      echo >>"Stopped at height" ^ move.axes[2].machinePosition ^ "mm"

      Should be:

      echo >>"0:/sys/savedData.txt" "Stopped at height" ^ move.axes[2].machinePosition ^ "mm"
      

      i.e. you need to specify the filename again.

      Instead of using move.axes[2].machinePosition I suggest you use sensors.probes[0].lastStopHeight as I suggested earlier.

      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

      tecnoundefined 1 Reply Last reply Reply Quote 1
      • tecnoundefined
        tecno @dc42
        last edited by

        This is what works now, only missing part is date/time stamp.

        ; test var.g macro
        datetime 0.758 1.074 1.122 0.821
        datetime 0.708 1.074 1.022 0.771
        
        G28
        var z1 = 0
        var z2 = 0
        var z3 = 0
        var z4 = 0
        M562                    ; clear any bed transform from mesh leveling
        G90                     ; absolute positioning
        G1 Z50 F4000            
        G1 X0 Y0				; 1 point
        G30 S-1
        set var.z1 =  sensors.probes[0].lastStopHeight
        G1 Z50 F4000 
        G1 X-154 Y-164 F4000    ; 2 point   
        G30 S-1
        set var.z2 = sensors.probes[0].lastStopHeight
        G1 Z50 F4000
        G1 X-63 Y214 F4000      ; 3 point   
        G30 S-1
        set var.z3 = sensors.probes[0].lastStopHeight
        G1 Z50 F4000
        G1 X217 Y-52 F4000      ; 4 point   
        G30 S-1
        set var.z4 = sensors.probes[0].lastStopHeight
        G1 Z50 F4000
        echo >>"testFile.csv" "datetime", var.z1, var.z2, var.z3, var.z4
        G28
        
        
        achrnundefined 1 Reply Last reply Reply Quote 0
        • achrnundefined
          achrn @tecno
          last edited by

          @tecno said in M671 like function for Delta printer:

          echo >>"testFile.csv" "datetime", var.z1, var.z2, var.z3, var.z4

          echo >>"testFile.csv" state.time, var.z1, var.z2, var.z3, var.z4

          tecnoundefined 1 Reply Last reply Reply Quote 1
          • tecnoundefined
            tecno @achrn
            last edited by

            @achrn

            Is there a way to format output to 0,000 and not 0.000 as this is a language problem?

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

              @tecno if the format is CSV then you must use '.' as the decimal separator character, because ',' is used to separate one field from the next. The program you use to import the .csv file should recognise '.' as the decimal separator.

              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

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

                @dc42 said in M671 like function for Delta printer:

                @tecno if the format is CSV then you must use '.' as the decimal separator character, because ',' is used to separate one field from the next. The program you use to import the .csv file should recognise '.' as the decimal separator.

                I use LibreOffice Calc in Swedish and the import is now in TEXT mode with '.' and needs to be in NUM mode with ',' to work OK

                dabb6cd0-9377-47aa-988d-c7caa44dd9f4-image.png

                As you can see only fields with NUM values can be used for calc and that is with comma. Field separator should be something else to be imported correctly.

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

                  @tecno I suggest you import in CSV mode instead and change the macro to insert commas between the fields.

                  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

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

                    @dc42

                    Have to change import to UK language settings, so it kinda works 😉

                    So the datafields will have commas as decimal separators! The field separators works OK with commas.
                    I am sure others will have issues with this where decimal separators are commas.

                    Have had this kind of problems with other software where '.' was used as decimal separator. So maybe you guys should look to see what you can do to get things working all over the planet. My 2cents.

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

                      @tecno it looks like Excel allows you to specify the decimal separator when importing but Libre Office doesn't. https://ask.libreoffice.org/t/specify-decimal-separator-in-text-import/53621

                      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

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

                        @dc42

                        Only way around this is to set the import to:
                        1c4eb7d9-5f8e-4bf9-910c-0085394d0f71-image.png

                        Exel >>>>>>>>>>>>>>> no way I will pay for that MS shit 😉

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