On a side note(;-) This brings up one of the reasons that many choose to use the G28.1 method to find the TOM (top of material). The G28.1 cycle stops on contact THEN backs up to reset the switch. This takes out the overun, loss motion, switch travel and material flex variables. When the cycle stops you are at the TOM all that is needed is to Set Z, move to pierce hieght and go.
The G28.1 speed is also presettable in config as a percentage of Rapid.
What you do loose with it is the ability to use the G68 to do coord rotation as the G28.1 will NOT run in coord space. AND it does NOT error out, it just hops over it and continues the Gcode (that needs fixin to allow Z to home in G68)
Just a thought, (;-) TP