To you gurus out there. I want to write a custom macro that I can run with my pendant when I finish a surfacing job I repeatedly do. I often run it multiple times taking off .02 at a time.
I want my surfacing bit to move to a specific location in the WCS; X= +30, Y= +17 (clear of the material). I then want the bit to do a rapid move to Z0, then move to -.02 (to account for the material I previously removed) and make that the new Z0 position. Then raise the bit 2 inches to clear the surface and any clamping, and lastly move to X0 Y0 to be run again.
I’m thinking this could be it, but want someone to proof it:
You do NOT want to use this command! This will re-home the Z axis of the machine at it’s current location. This will cause you a LOT of issues as the machine will now think that the top of Z travel is wherever the Z currently is.
What you actually want to do is set your “work offset” for Z at that position (more commonly called your “z zero”)
You can do that with this command:
G92 Z0
This command says “set my Z zero right here, and make it 0”
If you did G92 Z1 you’re saying “I am 1” above the material right here"
I didn’t give it a thorough review. Your best bet is to test it one line at a time. You can use the “single block” button on the main screen to step through it one line at a time.
That code just jumped out at me was that M26, that would have caused you a lot of issues.