Stirlings program doesn't work.
This is not fair or true and I'm sorry you've chosen to put it like that. As I explained in our PM correspondence it clearly states in your controller manual that Ajax handles G31/probing differently from the standard Mach3 way and that's why my routines don't work FOR YOU. Here's the relevant section from your manual.
The Ajax MPU11 supports high speed probing through the use of the G31 command – however the
current implementation differs slightly from the normal Mach3 implementation. In particular, the point
of contact is written to OEM DROs 2000 through 2007, and OEM DRO 1999 is used to indicate
whether or not a contact has occurred. Also, when using G31 within a macro to digitize an object, all
output should be explicitly written to a file (rather than relying on the OpenDigFile and CloseDigFile
functions) – the macro should also wait until the G31 is complete before issuing any further commands.
FWIW I was going to see whether I could re-write my routine specially for your ajax controller - somehow now I don't feel so inclined.