Allan is 100% correct on this. And he also tested empirically. Good job!
A G31 move will either skip, or not. Meaning probe strike, or not. If the probe strikes a surface, the G code variables are filled with the strike position. If the probe does NOT touch a surface, the G code variables will contain the end point of the move. Normally, this is the ONLY way to know if the probe has touched a surface in G code is by comparing the G code variable positions to the end point of the move. If different, the probe struck a surface.
Since Mach is not running on a real time OS, it can't possibly capture the strike position accurately. So this job is delegated to the motion controller, which is a real-time device. So if the values in those G code variables are not correct, then I would suspect an issue with the motion controller or its' plugin.
If there is a hang waiting on a set still, then the motion control plugin is not working correctly. Again, since Mach is not running on a real-time OS, and Mach doesn't know the outcome of the G31 move, it will ask the motion controller/plugin to tell it when the move is complete. It could have reached the endpoint of the move or stopped somewhere in between. Mach just doesn't know. So Mach will wait indefinitely for a response back from the motion controller. If no response is given, hang.
Fanuc only specifies the variables #5061-#5066, which should be the position with all current offsets applied. Mach also gives you #5071-#5076, which should be the machine position. All of these positions are in native machine units. Meaning if you setup the machine for inch, then inches is what you will see in those variables, even if you are probing in G21.
On an inch machine:
G90 G21
G00 X0
G31 X10 F1000 (probe does not strike)
At the end of the move #5071 == .393701 (inch value for 10mm)
Steve