Recording positions to create a GCODE file for playback?
-
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?
-
@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 fileSomething 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 -
@OwenD Thank you! I will digest this at work tomorrow and let you know how it goes!