(Surface measure macro)
(Tool is placed somewhere above the surface sensor)
(#5490 - Surface Sensor Width)
G28.2 Z0 (save current Z into Register1.Z)
M89 L0 P5 (watch for input(P) releseased(L0))
G91 G0 Z -30.000 F  30.0
(move down, stop if sensor triggered)
G4 P0.05
G90 G10 L70 P#5220 Z#5490
(set current work position as 0, depends on surface sensor width)
G4 P0.05
(#5431...#5438 - Work area Max)
G53 G0 Z[#5433-1.0] F3000.0(Move up to top position)
