As Steve S. said in another post, there could be a hardware solution to this problem. The G31.x stuff is purely a software convenience that is found nowhere else in the CNC world. Usually, M codes are used to "turn on" a specific probe before G31 is called. The M codes would typically control outputs that in turn control relays that enable the probe signal path to the desired probe. I have multiple probes (tool setter and spindle probe) on my machine and that is how it is handled because it used to run Mach 3 and before that it had a YASNAC control on it. It works well, so I have never "upgraded" to G31.X.
Steve