(Tool length measure macro)
(#20 is fast speed motion length)
(#5421...#5428 - Work area Min)
(#5431...#5438 - Work area Max)
(#5471...#5479 - Tool Length Sensor position)
#100=1500.0 (Speed Z)
#101=5000.0 (Speed XY)

G53 G0 X#5471 Y#5472 F#101 (move to Tool Sensor Position)
G91 G0 Z[0-#20] F#100
G53 G90 G38.9 Z[#5473 - 20] F  20.0
G04 P0.2

G10 L80 P7215 Q0
G10 L190 P7215 Q5403
(G10 L80 P5403 Q0)
(G10 L181 P7215 Q20)
G4 P0.05
G90 G10 L70 P#5220 Z [ #5490 - #5496 ]
(set current work position as 0, depends on surface sensor width & sheet thickness)
G4 P0.05
G90 G0 Z30.000000 F1000.0
(move up to safe height- absolute)
G92 Z 184
M102
M02
