I happened upon this thread while learning more about g-code. It occurred to me that your surfacing macro could potentially be enhanced by using a technique I use in my Go To Midpoint macro. which reads the current coordinates when it runs. My thought is that you could
- xyz probe the lower left corner to set origin.
- raise z the negative amount you’d like to use for either pass depth or final depth
- manually jog the machine to the top right corner of your workpiece (eyeball it or use known dimensions)
- then run the macro, which would use the current x y z parameters to populate your macro parameters, eg. (untested)
#<x_width> = #5420 (use the current x position as workpiece width)
#<y_length> = #5421 (use the current y position as workpiece length)
#<final_depth> = #5422 (use the current z position as surfacing final depth)
You’d still need to have the feedrate and stepover configured, but if you commonly used the same tool and similar materials, it would mean you wouldn’t need to customize the script to run it on the fly.
Anyway- just an idea that could be handy. If i get around to trying to implement i’ll follow up here. Usually I end up using my planer to surface prior to the cnc.