Trying to make a auto tool zero button work, with a limit switch.

Dynomotion Kflop driven limits and motors.
Mach3, ports and pins, probe activated, set to kflop board pin 24. Switch works in Kflop I/O screen and 'Digitize' light functions in Mach3 diagnostics.

When I execute G31 Z 5 F5.0....when I hit the switch nothing is set...
Do I need a script to set tool to Z 0?
Tried running some user script for auto tool zero I found online but still no response from probe switch.

Any help appreciated.

Thanks
Chris