local hsig = mc.mcSignalGetHandle(1,inst, ProbeSignal,mc.ISIG_INPUT11)
above line doesn't look right....if you want the handle to ISIG_PROBE is should be:
local hSig = mc.mcSignalGetHandle (inst, mc.ISIG_PROBE)
if mc.mcSignalGetState (hSig) == 1 then do something end
--on a side note, once I finish moving and reassemble my machine and equipment, I'll work on this for you....pending, I can get G31 working for me.