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

    RRF 3.1.1 move.axes[0].userPosition=move.axes[0].userPosition/2

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    3
    309
    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.
    • rziundefined
      rzi
      last edited by

      I'm trying to make a hole probe macro with RRF 3.1.1

      Is it possible to read current axis work position and divide it by 2?

      The below does not work: move.axes[0].userPosition=move.axes[0].userPosition/2
      but is it possible to achieve this in some other way?

      ::Rickard::

      1 Reply Last reply Reply Quote 0
      • NexxCatundefined
        NexxCat
        last edited by

        Wouldn't you just need to do the following?

        G0 X{move.axes[0].userPosition/2}
        
        1 Reply Last reply Reply Quote 1
        • rziundefined
          rzi
          last edited by

          Thanx! woprks very well now. This is what I ended up with.

          M558 K0 P5 C"!io2.in" F100; create probe #1 for use with M585, active low

          G38.2 X596 P0
          G10 P2 L20 X0
          G0 X{move.axes[0].userPosition-1}
          G38.2 X0 P0
          G0 X{move.axes[0].userPosition/2}
          G10 P2 L20 X0
          
          
          G38.2 y810 P0
          G10 P2 L20 Y0
          G0 Y{move.axes[0].userPosition-1}
          G38.2 Y0 P0
          G0 Y{move.axes[1].userPosition/2}
          G10 P2 L20 Y0
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA