Exactly TP. The G31 should only be used once the stylus is in a known distance from the area to probe. Otherwise oops. You are correct. You can use a probe activate to monitor tripping of the G31 is not active. Fanuc uses Macro Interrupt. A macro UI input is used to stop the active program and then call an error handler that wraps over the running probe macro. Works very well if done correctly.
When probing in point def around a radius where you continuosly trip at interval to track position this functionality would greatly enhance the sequence. Renishaw has a probe that can do this but I have only seen it work with Siemens.
No matter what I always have my clients use the probe builder plugins with either GibbsCam or MasterCam. The routines are laid into the tool paths and then posted with all the macros written to match. Works fantastically.
Mach 4 does not have Macro Interupt but I am certain it could be written into the PLC. Needs to be a high speed input channel. Hence why I mentioned the FPGA input. The plugin works faster at deciding to stop all motion. Also, having a special bit to tell Mach and the FPGA that a probe is present could then turn on protected mode and turn all rapids to a kbown safe speed matching the needed time to stop the motion as soon as the trip occurred. Very important. Siemens does this. Fanuc not so much. Lol. But it can be done. Check box for tool type is all that is needed.
Ideas?