Originally Posted by
dpuch
Nice macro angelw.
Regarding the use of #500 and above you are right. In my example there is no need, and they should be replaced with #100 series variables. As for the difference between M0 and #3006 it is mostly visual, as the one outputs an error message that may send the wrong message to operators. Also I have not used it that way personally, especially where I intended to continue the program after that line. I intentionally wrote it so the program could be interrupted and restarted. The logic was because I have machines that do not like to cycle start a program if not at home position. Of course looking back at it that still would have been an issue without going the custom G-code route as angelw describes. His solution should be a lot nicer to use.