End GCODE not working due to M2

I would like to home my machine before and after each job. The $H command works fine in the start gcode but not in the end gcode. Looking at the gcode LightBurn produces, it puts an M2 command (End Program) which effectively stops any further movement commands like homing or GoTo. If I comment out M2, it works. Any way that M2 command could be moved after the user end gcode? Or is there a way to re-enable move commands to overturn the M2 command? I have a GRBL 0.9 controller. And yes I know about the Finish Position but I have a small amount of negative X workspace that LightBurn does not like and it sets X finish to 0 instead. It does at least get the Y gantry out of the way so I do use it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.