I have encoders with index pulse on the lead screws and X and Z limit switches. I would like to home on the limit switches then move off to the first index pulse using a probing call, mc.mcCntlGcodeExecute(inst, "G31 X-.5000 f2"), near the end of the refAllHome function. And mc.mcCntlGcodeExecute(inst, "G31 Z-.5000 f2") for Z. Then set Home.
I will use PMDX ("Input A", encoder A signal), X Index signal for the Probe input and "Input B", encoder B, Z Index signal for a user input. In code when the user signal goes high it will set the Probe signal high stopping the G31 move and set home.
I have to verify but I believe the rotary shaft encoders have an open-collector style output. If not I'll use MOSFETS in each Index line.