Ability to define post-cut spindle move

Hey @MarkRasmussen, sorry for the delay, the holidays got in the way. Anyhow, here are the header and footer sections of my g code template.

Header. The key here is that the first move the machine makes (G28) is to raise the router to the machine Z0 which is the top of the z axis on my machine. The spindle starts up (M3), there’s a pause to let it get to speed (G4). The next motion command is the G0 that moves the raised router to the start of the carve. This clears any clamps.

Remember that G28 motion commands use machine coordinates, not work coordinates.

G90
G21
G90 G94
G17
G21
G28 G91 Z0
G90
S12000 M3
G4 P3.0
G54
M9 
F300.0
G0 X281.445 Y216.237
G1 X283.712 Y218.153 Z-3.635

That G0 above is the start of the generated g code.

Footer. Here the G1 and G0 moves are the end of the generated g code. I included them for illustration. Again note the first G28 move at the end of the carve is to move the router to the top of the Z axis. This again ensures all items below the cutting height of the gantry are cleared on the next G28 move which in my case sends the router to the rear right corner in order to get the router out of the way to inspect the work. Finally the spindle turns off and the machine is safe to approach :).

G1 X377.996 Y211.082 Z-0.321
G1 X377.703 Y210.924 Z-0.000
G0 Z1.000
G28 G91 Z0
G90
G28 G91 X0 Y0
G90
M5
M2

You do have to define the coordinate origin for G28 with G28.1 first so when you use the G28 move the controller knows where the reference origin for G28 is defined. The G28.1 command stores the values in the controller’s non volatile memory so they will be kept after powering the machine down.
Also, very important, note the G28 move also includes the G91 in the move AND the G90 after the move. This has to do with how G28 will interpret the axis values and it matters but I won’t go into the detail here. However you can read more on that detail on a separate post:
G28

Good luck, let me know if you have questions. Like I said, not sure if Easel can be set up to automatically insert these snippets into its output, but you can certainly insert them manually if needed.