( Simple Edge find - Tomas CNC version)
( Parameter #40 is axis )
( Parameter #50 is maximum distanse )

( Working cube values are situated in Parameters - )
( 5421 ... 5428 - Minimum point )
( 5431 ... 5438 - Maximum point )
( 5401 ... 5409 - Current Tool Offset )
( 5471 ... 5479 - Tool Length Sensor position )
( 5403 - Current Tool Z Offset )
( Position of Tool Sensor is situated in Parameters 5471 ... 5478 )

#10=10 (Sensor number)

#100=500 (Speed)

M88 L1 P#10
G91 G0 Z#50 F#100
G04 P0.2
M89 L0 P#10
G91 G0 Z[0-#50] F25
G04 P0.2


if [ #50 lt 0 ] 200
( Positive direction )
(G90 G10 L70 P1 Z[0-[#7075/2]])
JUMP 300


N200
( Negative direction )
(G90 G10 L70 P1 Z[#7075/2])

N300





