@dc42 Thanks for the feedback
Yes, M8 lead screws are being used for the axes, and the machine is planned for CNC purposes.
Heregoes the M558 command
; Z-Probe
M558 P5 C"!io8.in" H30 F300 T6000 ; enable Z probe sensor endstop io8.in (Main Board) set dive height, probe speed and travel speed
G31 X0 Y0 Z15.0 ; set or report current probe status
M557 X0:550 Y70:460 S100 ; define mesh grid