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

    Recording positions to create a GCODE file for playback?

    Scheduled Pinned Locked Moved
    General Discussion
    2
    3
    162
    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.
    • heathharperundefined
      heathharper
      last edited by

      Not sure exactly where to place this post, but I need to be able to move to multiple locations on my bed, move each axes as needed, and then record all of those movements for playback.

      Kind of like a "microsoft recording macro" for software, or a "Learn/Teach" pendant thing.

      I have looked into M28 and M29, but I must not be understanding it because as soon as I start the M28, the machine doesn't move...

      Any ideas or thoughts?

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

        @heathharper
        M28 just logs any GCode commands received to a file. So you would have to use the console to move the machine.

        You could use inside a macro M291 to allow you to jog around.
        And the echo command to add the current axes positions to the file

        Something like this (untested!!)

        ; recordMacro.g
        var speed = "1200" ; adjust to suit
        M291 R"Ready" P"Ready to begin?" S3
        echo >"myMacro.g" ";created at",state.time
        while true
           M291 R"Move" P"Jog to next position" X1 Y1 Z1 S3
           echo >>"0:/gcodes/myMacro.g" "G1 X"^{move.axes[0].machinePosition}, "Y"^{move.axes[1].machinePosition}, "Z"^{move.axes[2].machinePosition}, "F"^{var.speed}
        

        If you upgrade to RRF 3.5.0b1 you could request the speed for each move using the new M291 functionality
        Edit: You may want to add a G1 F"slow speed" before each of the jog moves
        Edit 2: corrected typo

        heathharperundefined 1 Reply Last reply Reply Quote 0
        • heathharperundefined
          heathharper @OwenD
          last edited by

          @OwenD Thank you! I will digest this at work tomorrow and let you know how it goes!

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