On some controls G53 is a one-shot use of the machine co-ord system.... so if the control can read G53 codes, and, you have proved that it does work by MDI... there should be no problem keeping it in your program. ie G53Z0 is go home fast to the machine Z zero position.
As for H numbers matching the tool #... that should be a "standard" you should adopt..... it won't stop a program from running
My 2cents.... sequence number zero (N0) may not be a legit range.
... best advice would be to single step the program to stop at the offending line.... then delete/modify items one at a time
.... if you run a program. your machine may read ahead many lines, making it harder to isolate any problem code.
If your machine requires you to manually toolchange.... M6 is an auto operation.... replace it with M00.. this makes the running program stop... forcing you to do something ... then cycle start to continue.
Mactec54
You seem to know what his machine & control is... want to let the rest of us know ? (the question was asked, but not answered)
I did say "some controls".... and if the actual code worked...it is his choice to keep using it, not yours.
I understand you have a lot of experience up your sleeve, but compelling a newbie to do jt to your coding method is not allowing him to develop on his own. There is quite often alternative methods
In testing the G53 worked so not a problem to have it in his program,
I'm just guessing like everyone else, but Mach3 I would say is his control a little out of your league, I just run his program through 2 different controls and it will run if he corrects it as I posted
When someone is learning they should start with the basic codes or know what the likes of G53 does, How it needs to be formatted in a line for it to work correct, so a standard G-Code like ( G0 ) is the simplest form of G-Code to know and what it does, Just the 2 letters tell you what it is going to do ( G0 )
Depending on how it is used in Mach3 it will either pass it by and not do that line which is bad, or just stop some of these control just won't run the program from the start if it has a Code that it does not like
You need to have used and installed these controls to make the comments you do
Mactec54