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

    Object model help please

    Scheduled Pinned Locked Moved Solved
    General Discussion
    6
    21
    924
    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.
    • appjawsundefined
      appjaws @OwenD
      last edited by

      @OwenD said in Object model help please:

      move.axes[0].machinePosition

      I would have expected the U move position to be updated with the X position but your suggestion of G92 U{move.axis[0].machinePosition} didn't update U which remained ar 0.

      This is what I get from the console
      move.axes[0].machinePosition
      Error: Bad command: move.axes[0].machinePosition
      Error: Bad command: move.axes[0].machinePosition

      appjaws - Core XYUV Duet Ethernet Duex5
      firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
      Ormerod 1-converted to laser engraver, Duet wifi
      OpenSCAD version 2024.03.18
      Simplify3D 5.1.2

      OwenDundefined 1 Reply Last reply Reply Quote 0
      • OwenDundefined
        OwenD @appjaws
        last edited by

        @appjaws
        Apologies
        Should be
        echo move.axes[0].machinePositiion
        It should return where X is at the time. If that's 0 then I'd expect G92 U... to set it thus

        appjawsundefined 1 Reply Last reply Reply Quote 0
        • appjawsundefined
          appjaws @OwenD
          last edited by

          @OwenD said in Object model help please:

          echo move.axes[0].machinePositiion

          echo move.axes[0].machinePositiion
          Error: meta command: unknown value 'machinePositiion'

          appjaws - Core XYUV Duet Ethernet Duex5
          firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
          Ormerod 1-converted to laser engraver, Duet wifi
          OpenSCAD version 2024.03.18
          Simplify3D 5.1.2

          OwenDundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
          • OwenDundefined
            OwenD @appjaws
            last edited by

            @appjaws
            😂 can't win. Try without the extra "i" in position
            One finger typing on a phone here.. gimme a break

            appjawsundefined 1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk @appjaws
              last edited by

              @appjaws theres too many i's in Position

              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
              • appjawsundefined
                appjaws @OwenD
                last edited by

                @OwenD Thanks again.
                Yes that worked but then why isn't G92 U{move.axis[0].machinePosition} working?

                just realised that axes is spelt axes not with an i

                So G92 U{move.axes[0].machinePosition} works.
                Will do some testing, thanks

                appjaws - Core XYUV Duet Ethernet Duex5
                firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                Ormerod 1-converted to laser engraver, Duet wifi
                OpenSCAD version 2024.03.18
                Simplify3D 5.1.2

                fcwiltundefined OwenDundefined 2 Replies Last reply Reply Quote 1
                • T3P3Tonyundefined
                  T3P3Tony administrators
                  last edited by

                  @appjaws if you are running at least DWC 3.2 then navigate to

                  Settings->general->plugins and turn on "Object Model Browser"

                  then you can explore the object model as it is on your board. (use refresh to update to see things change). use echo <object model key, value> as you have done with the move.axes[0].machinePosition to check you have a specific path correct. then you can use that in commands of meta commands as you need.

                  www.duet3d.com

                  1 Reply Last reply Reply Quote 0
                  • fcwiltundefined
                    fcwilt @appjaws
                    last edited by

                    @appjaws said in Object model help please:

                    just realised that axes is spelt axes not with an i

                    You likely know this but I will mention it just to be sure. Axis is singular, Axes is plural.

                    Frederick

                    Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                    1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman @appjaws
                      last edited by

                      @appjaws said in Object model help please:

                      @deckingman Ha Ha. I don't have a stop.g or cancel.g so I assume the machine just uses whatever is the default.
                      What have you in your stop and cancel and where are they located?
                      Thanks for the help

                      Hi Paul,

                      Looks like your getting the help you need with object model commands.

                      Ref pause.g, cancel.g etc. These macros all go in the sys folder (along with the homing macros, tool change macros etc). They might or might not be "auto generated" so they might or might not exist. They might also exist but be empty of any commands.

                      "pause.g" runs if you hit the pause button during a print in DWC (or otherwise send pause command). What you do inside that macro is entirely up to you. Similarly, cancel.g runs if you hit cancel (after already having paused the print).

                      Here is an example of my cancel.g

                      G10 ; retract
                      M98 P"0:/macros/ToolTemps/ToolTemps0.g" ; set the tool temperatures to zero
                      
                      G91 ; set relative
                      G1 Z5 F240 ; move bed down 5mm
                      G90 ; back to absolute
                      G1 X165 U165 A165 Y300 V300 B300 F9000 ; move to rear
                      
                      M140 S0 ; turn off bed
                      M106 S0 ; turn off part fan
                      

                      Note the additional UV commands that I had to add (and also AB commands in my case).

                      So check those files, and if they contain any XY moves, then make sure to add UV moves to those lines. It's not much work and will save you having nasty experiences like I had when I stupidly forgot about them.

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      1 Reply Last reply Reply Quote 1
                      • OwenDundefined
                        OwenD @appjaws
                        last edited by

                        @appjaws
                        Apologies again.
                        Yes, should be axes, not axis.
                        Not sure if that was me or autocorrect
                        As stated above, always check the exact syntax using the object model browser.
                        e.g. "machinePosition" would work, but "machineposition" would not.

                        1 Reply Last reply Reply Quote 1
                        • appjawsundefined
                          appjaws
                          last edited by

                          Thank you for all the help, everything is now working correctly and my printer has a lot less vibration.

                          appjaws - Core XYUV Duet Ethernet Duex5
                          firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                          Ormerod 1-converted to laser engraver, Duet wifi
                          OpenSCAD version 2024.03.18
                          Simplify3D 5.1.2

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